hack, Program, Oyun, Ceptelefonu, Ogame, crack, serial, donanım
Ağustos 20, 2008, 02:54:59 ÖS *
Program, Oyun, Crack, Serial, Msn Hack, Hacking ve güvenlik portalına hoşgeldiniz.. Lütfen giriş yapın veya üye olun.

Kullanıcı adınızı, parolanızı ve aktif kalma süresini giriniz
 


Sayfa: [1]   Aşağı git
Yazdır
Gönderen Konu: C# \ C++ Örnek Kodlar  (Okunma Sayısı 769 defa)
0 Üye ve 1 Ziyaretçi konuyu incelemekte.
JESUSKANE
Yüzbaşı
**

Rep Puanı : 22


Offline Offline

Cinsiyet: Bay
Konu Sayısı : 55 Mesaj Sayısı: 119

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK


WWW
« : Eylül 21, 2007, 09:22:12 ÖS »

girdiginiz sayilarin kac tanesinin cift kac tanesinin tek oldugunu ekrana yazar..

#include<stdio.h>
#include<conio.h>
int main()
{
int a;
int even,odd; /*even=cift, odd=tek*/
printf("Enter 10 numbers : \n");
scanf("%d %d %d %d %d %d% %d %d %d %d",&a);
for(a=1;a<=10;a++) {
if(a%2==0){
printf(" even\n ");
even++; }
else { printf(" odd \n");
odd++; }

}
printf(" %d even, %d odd ",even,odd);
}
_______________________________________

girilen iki sayinin ussunu bulur [2 uzeri 5= 32 gibi>

#include<stdio.h>
#include<conio.h>
#include<math.h>

int power(int,int); /*fonksiyon prototipi tanimliyoruz..*/ /*eger bunu yazmak istemezseniz asagidaki fonksiyonu bunun yerine yazabilirsiniz, bu prototipi yazarsaniz program yukaridan asagiya dogru kodlara baktigi icin programin yurutulmesi sirasinda bir fonksiyon oldugunu anliycaktir. bu komut sadece daha ii akis saglamak amaciyla yazilir..*/

int main(void)
{
int x;
x=power(a,b);
printf("enter 2 number please: \n"); /*burada iki sayi girmeniz isteniyor..*/
scanf("%d %d",&a,&b); /*burda ise girdiginiz 2 sayi okunuyor.we ilk sayi a,ikinci sayi ise b olarak ataniyor..*/
printf("a to the power of b = %d\n",x);
printf("-3 to the power of 4= %d\n",power(-3,4));
printf("10 to the power of 3= %d\n\n",power(10,3));
printf("x= %d ",x);
return 0;
}

int power(int base,int w) /*bu kodlarda power yani us fonksiyonun nasil isledigini acikliyor..*/
{
int x;
for(x=1;w>0;w--)
x=x*base;
return x;
}
_________________________________________

girdiginiz 2 sayinin asal olup olmadigina bakior..

#include<stdio.h>
#include<conio.h>

int prime(int n) /*burda fonksiyon prototipi yazmak yerine yukarida belirttigim gbi fonksiyonu direk olarak buraya yazabilirsiniz..*/
{
for(int i=2;i<n;i++)
if(n%i==0)return 0;
return 1;
}


int main()
{
//clrscr();
int x,y;
printf("Enter two number:\n");
scanf("%d %d",&x,&y);


while(y!=x)
{
if(prime(x)==1)
printf(" %d",x);
x++;
}

getch();
return 0;
}
___________________________________________

switch leri anlamaniz icin kolay bir baslangic olabilir..

#include<stdio.h>
#include<conio.h>
int main(void)
{ //clrscr();
int m,n,a,s;
m=1,n=3,a=3,k=1;
do
{
switch(m>n || a==n)
{
case 1=a++;
if(m!=n) continue;
break;
default:
do
{
m+=2;
s+=m*n;
printf("\n%d %d %d",m,s,n);
}
while(s<25);
}

a-=2;
n=m;
printf("\nA=%d N=%d M=%d S=%d",a,n,m,s);
}
while(a!=0);

}


--------------------------------------------

#include<stdio.h>
#include<conio.h>
int main(void)
{ // clrscr();
int i=10,j=20;
if(i>10)
if(j>20)
if(i+j>10) printf("A");
else printf("B");
else if(j-i>10) printf("C");
else printf("E");
else printf("D");
getch();
return 0;
}

--------------------------------------------

#include<stdio.h>
#include<conio.h>
int main(void)
{ clrscr();
int a,k,i,x;
a=(a=k=3,k++,k+=a++);
printf("%d %d",&a,&k);
for(a=2,i=0;i<7;i+=2)
{
x=a>i?a++:a+i; /*burada kosul operatorunu goruyoruz:?, anlami eger :'nin sagindaki kosul dogru ise 1 solundaki kosul dogru ise 0 olarak cikmasini saglar..*/
printf("%d",&x);
}
getch();
return(0);
}
___________________________________________

saat hesabi yapar.. girdiginiz sayinin kac saat kac dakika kac saniye oldugunu bulu..

#include<stdio.h>
#include<conio.h>
int main(void)
{ clrscr();
int seconds,hrs,mins,secs;
printf("Enter the time in seconds:");
scanf("%5i",&seconds);
hrs=seconds/3600;
seconds-=hrs*3600;
mins=seconds/60;
seconds-=mins*60;
secs=seconds;
printf("\n%d hrs %d mins %d secs",hrs,mins,secs);
getch();
return 0;
}
_______________________________________________

bir yıla ait takvimi ekrana yazdıran program.

#include <stdio.h>
#include <conio.h>

#define BASE_YEAR 1900

int is_leap(int year);
long date_to_num(int day, int month, int year);
int which_day(int day, int month, int year);
void display_calender(int month, int year);

int month_day[12> = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
char *month_name[> = {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul","Aug", "Sep", "Oct", "Nov", "Dec"};

int main(void)
{
int i, year;

for (; {
printf("enter year :");
scanf("%d", &year);
if (year < BASE_YEAR)
printf("year must be grater than %d\n", BASE_YEAR);
else
break;
}

for (i = 1; i < 13; i++) {
display_calender(i, year);
if (i % 3 == 0) {
printf("press any key to continue");
getch();
clrscr();
}
}
return 0;
}
/************************************************** /
int is_leap(year)
{
return (year % 4 == 0 && year % 100 != 0 || year % 400 == 0);
}
/************************************************** /
long date_to_number(int day, int month, int year)
{
int i;
long total = day;

for (i = BASE_YEAR; i < year; i++)
total += 365 + is_leap(i);

for (i = 0; i < month - 1; i++)
total += month_day + (i == 1 && is_leap(year));
return total;
}
/************************************************** /
int which_day(int day, int month, int year)
{
long i = date_to_number(day, month, year);

return (int) (i % 7);
}
/************************************************** /
void display_calender(int month, int year)
{
int first_day = which_day(1, month, year);
int total_day = month_day[month - 1>;
int i;

if (month - 1 == 1)
total_day += is_leap(year);
printf("Sun Mon Tue Wed Thu Fri Sat");
printf(" %s %4d\n", month_name[month - 1>, year);
printf("---------------------------------\n");
for (i = 0; i < first_day; i++)
printf(" ");
for (i = 1; i <= total_day; i++) {
printf("%-5d", i);
if ((i + first_day) % 7 == 0)
putchar('\n');
}
printf("\n");
}
____________________________________________

ekran çıktısı olarak dünya haritasında verilen enlem ve boylama ilişkin yeri gösteriyor.

main(l
,a,n,d)char**a;{
for(d=atoi(a[1>)/10*80-
atoi(a[2>)/5-596;n="@NKA\
CLCCGZAAQBEAADAFaISADJABBA^\
SNLGAQABDAXIMBAACTBATAHDBAN\
ZcEMMCCCCAAhEIJFAEAAABAfHJE\
TBdFLDAANEfDNBPHdBcBBBEA_AL\
H E L L O, W O R L D! "
[l++-3>for(;n-->64
putchar(!d+++33^
l&1);}
_____________________________________________

Carpim Tablosu..

#include<stdio.h>
#include<conio.h>

int main(void)
{
int a,b;
a=1;
b=1;

for( ; a<=10;a++)
for(b=1;b<=10;b++)
printf("%d*%d=%d\n", a,b,a*b);

return(0);
}
______________________________________

Faktoriyel Bulur..

#include<stdio.h>
#include<conio.h>

int main(void)
{
int n,fac,count;
clrscr();

printf("enter a number for factorial:");
scanf("%d",&n);

fac=1;
for(count=1;count<=n;++count)
{
fac=fac*count;
}
printf("fac=%d",fac);
getch();
return(0);
}
_______________________________________

Girdiginiz 3 sayinin en buyugunu bulur..

#include<stdio.h>
#include<conio.h>
int main(void)
{
clrscr();
int a,b,c;
int max;
printf("enter three number:\n");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
if(a>c)
max=a;
else max=c;
if(b>c)
max=b;
else max=c;

printf("greatest one is=%d",max);
return 0;
}
_______________________________________

Dairenin alanini bulur..

#include <stdio.h>
#include <conio.h>
#define PI 3.14

int main(void)
{
float area,
rad;
clrscr();
printf("give radius= ");
scanf("%f",&rad);

area=PI * rad * rad;

printf("that %f area. \n",area);

return(0);
}
____________________________________

Silindirin alanini we hacmini bulur..

#include<stdio.h>
#include<conio.h>


int main(void)
{
float A,V,r,h;
clrscr();

printf("enter radius and height:");
scanf("%f %f",&r,&h);

V=3.14*r*r*h;
A=2*3.14*r*h;

printf("A=%f V=%f",A,V);
getch();
return(0);
}
_________________________________________

2 sayinin karesini alir..

#include<stdio.h>
#include<conio.h>

int main(void)
{
float a,sq;
clrscr();
printf("SAYI GIR:");
scanf("%f",&a);

sq=a*a;

printf("sq=%f",sq);
getch();
return(0);
}
Logged

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK.........
JESUSKANE
Yüzbaşı
**

Rep Puanı : 22


Offline Offline

Cinsiyet: Bay
Konu Sayısı : 55 Mesaj Sayısı: 119

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK


WWW
« Yanıtla #1 : Eylül 21, 2007, 09:24:00 ÖS »

C++ analog saat bileşeni.

Horloge.h


#ifndef HorlogeH
#define HorlogeH
//---------------------------------------------------------- -----------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
//---------------------------------------------------------- -----------------
class PACKAGE THorloge : public TGraphicControl
{
private:
TTimer *Timer1;
Graphics::TBitmap *Image1;
bool FSec;
bool __fastcall CanResize(int &NewWidth, int &NewHeight);
protected:
void __fastcall Tempo(TObject* Owner);
void __fastcall Paint();
public:
__fastcall THorloge(TComponent* Owner);
virtual __fastcall ~THorloge();
__published:
__property Anchors;
__property ParentShowHint;
__property ShowHint;
__property Visible;

__property bool Seconde = {read=FSec, write=FSec, default=true};
};
//---------------------------------------------------------- -----------------
#endif











Horloge.cpp

#include <vcl.h>
#include <math.h> #pragma hdrstop
#include "Horloge.h"
#pragma package(smart_init)
//---------------------------------------------------------- -----------------
//

static inline void ValidCtrCheck(THorloge *)
{
new THorloge(NULL);
}
//---------------------------------------------------------- -----------------

__fastcall THorloge::THorloge(TComponent* Owner)
: TGraphicControl(Owner)
{
Controls tyle << csOpaque;
Image1 = new Graphics::TBitmap();
Timer1 = new TTimer(NULL);
Timer1->OnTimer = Tempo;
FSec=true;
Width = 120;
Height = 120;
Image1->Width = Width;
Image1->Height = Height;
}
//---------------------------------------------------------- -----------------
__fastcall THorloge::~THorloge()
{
delete Image1;
delete Timer1;
}
//---------------------------------------------------------- -----------------
bool __fastcall THorloge::CanResize(int &NewWidth, int &NewHeight)
{
NewWidth = 120;
NewHeight = 120;
return true;
}
//---------------------------------------------------------- -----------------
void __fastcall THorloge::Tempo(TObject* Sender)
{
Invalidate();
}
//---------------------------------------------------------- -----------------
void __fastcall THorloge:aint()
{
float n,z,u,x0,y0,x1,y1,x2,y2,x3,y3;
TDateTime heure;
TPoint points[4>;
Word wHour, wMinute, wSeconde;

heure = Now();
DecodeTime(heure, wHour, wMinute, wSeconde, NULL);

// Couleur de fond.
Image1->Canvas->Brush->Color = Color;
Image1->Canvas->Pen->Color = Color;
Image1->Canvas->Rectangle(0,0,Image1->Width,Image1- >Height);

// Dessin du cercle.
Image1->Canvas->Pen->Color = clBlack;
Image1->Canvas->Pen->Width = 2;
Image1->Canvas->Ellipse(2,2,118,118);

// Dessin du texte.
Image1->Canvas->Font->Name = "Arial";
Image1->Canvas->Font->Color = clBlack;
Image1->Canvas->Font->Size = 8;
Image1->Canvas->TextOut( 50,80,"CGi");

Image1->Canvas->TextOut( 55,6,"12");
Image1->Canvas->TextOut( 58,101,"6");
Image1->Canvas->TextOut( 8,53,"9");
Image1->Canvas->TextOut( 105,53,"3");

Image1->Canvas->TextOut( 81,13,"1");
Image1->Canvas->TextOut( 97,30,"2");

Image1->Canvas->TextOut( 98,76,"4");
Image1->Canvas->TextOut( 81,94,"5");

Image1->Canvas->TextOut( 33,94,"7");
Image1->Canvas->TextOut( 15,76,"8");

Image1->Canvas->TextOut( 14,30,"10");
Image1->Canvas->TextOut( 32,13,"11");

Image1->Canvas->Pen->Width = 1;

// Dessin aiguille des secondes si FSec à true.
if (FSec)
{
n = wSeconde*200/60;
z = n/100*3.14159;
u = (n+50)/100*3.14159;

x0 = sin(z)*50;
y0 = -cos(z)*50;

x1 = -sin(z)*10;
y1 = cos(z)*10;

x2 = sin(u)*2;
y2 = -cos(u)*2;

x3 = -sin(u)*2;
y3 = cos(u)*2;

points[0> = Point(x1+60,y1+60);
points[1> = Point(x2+60,y2+60);
points[2> = Point(x0+60,y0+60);
points[3> = Point(x3+60,y3+60);

Image1->Canvas->Brush->Color = clRed;
Image1->Canvas->Polygon(points, 3);
}

// Dessin aiguille des minutes.
n = wMinute*200/60 + wSeconde*200/60/60;
z = n/100*3.14159;
u = (n+50)/100*3.14159;

x0 = sin(z)*50;
y0 = -cos(z)*50;

x1 = -sin(z)*10;
y1 = cos(z)*10;

x2 = sin(u)*4;
y2 = -cos(u)*4;

x3 = -sin(u)*4;
y3 = cos(u)*4;

points[0> = Point(x1+60,y1+60);
points[1> = Point(x2+60,y2+60);
points[2> = Point(x0+60,y0+60);
points[3> = Point(x3+60,y3+60);

Image1->Canvas->Brush->Color = clAqua;
Image1->Canvas->Polygon(points, 3);

// Dessin aiguille des heures.
n = wHour*200/12 + wMinute*200/60/12;
z = n/100*3.14159;
u = (n+50)/100*3.14159;

x0 = sin(z)*35;
y0 = -cos(z)*35;

x1 = -sin(z)*10;
y1 = cos(z)*10;

x2 = sin(u)*4;
y2 = -cos(u)*4;

x3 = -sin(u)*4;
y3 = cos(u)*4;

points[0> = Point(x1+60,y1+60);
points[1> = Point(x2+60,y2+60);
points[2> = Point(x0+60,y0+60);
points[3> = Point(x3+60,y3+60);

Image1->Canvas->Brush->Color = clYellow;
Image1->Canvas->Polygon(points, 3);

Canvas->Draw(0,0,Image1);
}
//---------------------------------------------------------- -----------------
namespace Horloge
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1> = {__classid(THorloge)};
RegisterComponents("Beyaz", classes, 0);
}
}
_______________________________________________

sayısal loto programı.

#include"stdio.h"
#include"stdlib.h"
#include"time.h"
void goster();
int kolon[6>;

void main()
{
int n,deger,j,w,m;
do
{
printf("KAC KOLON OYNAMAK ISTERSINIZ?\n");
scanf("%d",&n);
if(n<=0)
printf("KOLON SAYISI 0 veya Daha Kucuk OLAMAZ\n");
}
while(n<=0);

srand(time(NULL));
for(int i=0;i<n;i++)
{
for(j=0;j<6;j++)
{

deger=rand()%49+1;
for(m=0;m<=j;m++);
if(kolon[m>==deger)
deger=rand()%49+1;
else
kolon[j>=deger;


}
goster();
printf("%d.kolon\n",i+1);

for(w=0;w<6;w++)
{
printf("=>%d\t",kolon[w>);
}
printf("\n");
printf("*******************\n");
}
}

void goster()

{
int gec,i,j;
for(i=0;i<5;i++)
{
for(j=i+1;j<6;j++)
{
if(kolon[j><kolon)
{
gec=kolon;
kolon=kolon[j>;
kolon[j>=gec;
}
}
}
}
_____________________________________________

Telefon defteri örnek kodu.

Hepsini Seç#include<stdio.h>
FILE *fp;
char ad[15>,sy[20>,adr[50>,tel[15>,ceptel[20>;
char sec;
main()
{
fp=fopen("BILGILER/TELEFON REHBERI.txt","a");
do
{
printf("\t\t\tBILGILERI DIKKATLI GIRINIZ\n\n");
printf("\t\tADI :");
scanf("%s",&ad);
printf("\t\tSOYADI :");
scanf("%s",&sy);
printf("\t\tADRESI :");
scanf("%s",&adr);
printf("\t\tTELEFONU :");
scanf("%s",&tel);
printf("\t\tCEP TELEFONU :");
scanf("%s",&ceptel);
fprintf(fp,"AD:%s %s\n",ad,sy);
fprintf(fp,"ADRES:%s\nTEL:%s\nCEP TEL:%s\n",adr,tel,ceptel);
printf("\n\n");
printf("\t\tDEVAM ETMEK ISTIYORMUSUNUZ?(E/H)");
fflush(stdin);
sec=getchar();
}
while(sec!='h' && sec!='H');
fclose(fp);
getchar();
}
________________________________________

Taban Kuvvet Bulma!

#include <stdio.h>
double tabankuvveti(int, int);

int main()
{
int e,k;
printf("Shurzan'in kod denmelerine hos glediniz\n\nSimdi lutfen kuvveti hesaplanacak\nTabani gir: ");
scanf("%d",&e);
printf("Ussu gir: ");
scanf(
"%d",&k);
printf("Sonuc: %.f\n", tabankuvveti(e,k));
system ("PAUSE");
return 0;
}
double tabankuvveti(int x, int y)
{
int d;
static double a=1;

if(y==1)
return x;
else
if(y==0)
return 0;
else
for(d=1;d<=y;d++)
a=a*x;

return a;
}
____________________________________________

Maximum Değer!

/*calculates the product of two matrices*/
#include <stdio.h>
#define MAX 8
int main()
{
int a[MAX>[MAX>, b[MAX>[MAX>;
int c[MAX>[MAX> = { 0 };
int ra, ca, rb, cb;
int i, j, k;

printf ("Rows of the first matrice : "); scanf("%d", &ra);
printf ("Columns of the first matrice : "); scanf("%d", &ca);
printf ("Rows of the second matrice : "); scanf("%d", &rb);
printf ("Columns of the second matrice : "); scanf("%d", &cb);

if ( ca != rb) {
printf ("Matrices are not proper for multiplication\n");
return 0; }

printf ("First matrice: \n");
for (i = 0; i < ra; i++) {
for (j = 0; j < ca; j++) {
printf (" [%d,%d>: ",i+1,j+1);
scanf ("%d", &a[j>);
}
}
printf ("Second matrice: \n");
for (j = 0; j < rb; j++) {
for (k = 0; k < cb; k++) {
printf (" [%d,%d>: ",j+1,k+1);
scanf ("%d", &b[j>[k>);
}
}
for (i = 0; i < ra; i++) {
for (j = 0; j < cb; j++) {
for (k = 0; k < ca; k++)
c[j> = c[j> + a[k> * b[k>[j>;
}
}
printf ("Product:\n");
for (i = 0; i < ra; i++) {
for (k = 0; k < cb; k++)
printf ("\t%d",c[k>);
printf ("\n");
}
return 0;
}
_________________________________________________

Kare kök bulan!

#include <iostream.h>
#include <stdlib.h>
#include<math.h>
#include<stdio.h>
#include<conio.h>

int main()
{
double a,b,c,x;
char s;
ilk:
cout<<"\nLutfen bir sayi girin"<<endl;
cin>>x;
a=(x*x);
b=(x*x*x);
c = pow(x,0.5);
cout<<"\nKaresi "<<a<<endl;
cout<<"\nKupu "<<b<<endl;
cout<<"\nKare Koku "<<c;

cout<<"\n\nTekrar islem yapmak istiyor musunuz?(E/H)"<<endl;
cin>>s;

switch (s)
{
case 'e': { goto ilk; break;}
case 'E': { goto ilk; break;}
case 'h': { return 0; break; }
case'H' : { return 0; break;}
default : { printf("Lütfen E veya H girin."); break; }
}
getch();
return 0;
}

NOT: c++ ve dengi bir derleyicide çalıştırmanız gerekir. turbo c de çalışmaz.
______________________________________________

Ortalama Hesaplama!!!

#include<stdio.h>
#include<conio.h>
#include<math.h>

main()
{
float a[20>,ortalama,toplam,sayi;
int i,sayi_mik;
char b,secim;
printf("Baslamak icin b ye basiniz :");
scanf("%c",&secim);
clrscr();
while(secim!=b) //programin devamliligi icin
{
printf("Kac sayinin ortalamasini alacaksiniz :");
scanf("%d",&sayi_mik);
for(i=1; i<=sayi_mik; i++)
{
printf("\n%d. degeri giriniz :",i);
scanf("%f",&sayi);
a = a[i-1> + sayi; //girilen sayilari diziye yukler
toplam = a;
}
ortalama = toplam/sayi_mik;
printf("\nGirdiginiz %d sayinin ortalamasi = %.3f" ,sayi_mik, ortalama);
getch();
clrscr();
}
getch();
}
_________________________________________________

Makrolarla çalışmak!!

#include <stdio.h>
#include <stdlib.h>
#define HATALI(A) A*A*A /* Kup icin hatali makro */
#define KUP(A) (A)*(A)*(A) /* Dogusu ... */
#define KARE(A) (A)*(A) /* Karesi icin dogru makro */
#define START 1
#define STOP 9
main()
{
int i,offset;
offset = 5;
printf("shurzan'ın kod denemelerine hoş geldiniz\nBu progr***** makrolarla nasıl çalışılacağına örnektir.\n\n");
for (i = START;i <= STOP;i++) {
printf("%3d in karesi %4d dir, ve kubu ise %6d dir..\n",
i+offset,KARE(i+offset),KUP(i+offset));
printf("%3d in HATALIsi ise %6d dir.\n",i+offset,HATALI(i+offset));
}
system("pause");
}
___________________________________________--

İdeal kilona kavuş

include<stdio.h>
#include<conio.h>
int main(void)
{
int boy,a;
do
{
do{
clrscr();
printf("\n\n\n\n\n\n\n\n\t\t\t IDEAL KILONUZU BULUNUZ\n\n\n\n");
printf("\n\n\n\n\n\n\t\tL�tfen Boyunuzu 140 cm ile 210 cm aras�nda giriniz\n\n");

printf("\n\n\n\t\t\t\t Boyum : ");
scanf("%d",&boy);
}while(boy<140 || boy>210);

if(boy<145)
printf("\n\n\t\t\t\t Kilom : 42");
else if(boy<148)
printf("\n\n\t\t\t\t Kilom : 44");
else if(boy<150)
printf("\n\n\t\t\t\t Kilom : 46,5");
else if(boy<153)
printf("\n\n\t\t\t\t Kilom : 48");
else if(boy<155)
printf("\n\n\t\t\t\t Kilom : 49,5");
else if(boy<158)
printf("\n\n\t\t\t\t Kilom : 51");
else if(boy<160)
printf("\n\n\t\t\t\t Kilom : 52,5");
else if(boy<163)
printf("\n\n\t\t\t\t Kilom : 54");
else if(boy<165)
printf("\n\n\t\t\t\t Kilom : 56,5");
else if(boy<167)
printf("\n\n\t\t\t\t Kilom : 58,5");
else if(boy<170)
printf("\n\n\t\t\t\t Kilom : 60");
else if(boy<172)
printf("\n\n\t\t\t\t Kilom : 62,5");
else if(boy<174)
printf("\n\n\t\t\t\t Kilom : 63,5");
else if(boy<176)
printf("\n\n\t\t\t\t Kilom : 65");
else if(boy<178)
printf("\n\n\t\t\t\t Kilom : 66,5");
else if(boy<180)
printf("\n\n\t\t\t\t Kilom : 68");
else if(boy<183)
printf("\n\n\t\t\t\t Kilom : 70");
else if(boy<186)
printf("\n\n\t\t\t\t Kilom : 72");
else if(boy<188)
printf("\n\n\t\t\t\t Kilom : 73,5");
else if(boy<190)
printf("\n\n\t\t\t\t Kilom : 75");
else if(boy<192)
printf("\n\n\t\t\t\t Kilom : 77");
else if(boy<194)
printf("\n\n\t\t\t\t Kilom : 79");
else if(boy<197)
printf("\n\n\t\t\t\t Kilom : 82");
else if(boy<200)
printf("\n\n\t\t\t\t Kilom : 85");
else if(boy<203)
printf("\n\n\t\t\t\t Kilom : 87");
else if(boy<205)
printf("\n\n\t\t\t\t Kilom : 90");
else if(boy<208)
printf("\n\n\t\t\t\t Kilom : 93");
else
printf("\n\n\t\t\t\t Kilom : 95");
printf("\n\n\n\n\t\t\t Tekrar Denemek Istermisiniz?");
printf("\n\n\n\n\t\t\t\t Evet => 1");
printf("\n\n\n\t\t\t\t Hay�r => 2");
printf("\n\n\n\t\t\t\t Se‡imin : ");
scanf("%d",&a);
}while(a==1);
return 0;
}
______________________________________________

C de çeşitli şekiller çizen ve yazı yazan program.

#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>

int main(void)
{
/* request autodetection */
int gdriver = DETECT, gmode, errorcode;
int i;
int j;
int k;
int y;
/* initialize graphics mode */
initgraph(&gdriver, &gmode, "");

/* read result of initialization */
errorcode = graphresult();

if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");

getch();
exit(1);

/*C0d3d by -cod3mast3r- */

}

line(0, 0, getmaxx(), getmaxy());
arc(100,200,100,200,100);
setcolor(5);

for(i=0;i<100;i++)
{
for(k=0;k<1000;k++)
for(j=0;j<30000;j++)
{}
setcolor(i);
arc(getmaxx()/2+i,getmaxy()/2+i,0,360,100-i);
}



outtextxy(10,10,"Waaaoooowww what a race !");


for(i=0;i<200;i++)
{
for(k=0;k<1000;k++)
for(j=0;j<30000;j++)
{}
setcolor(i);
arc(getmaxx()/2+i,getmaxy()/2+i,0,360,100-i);
}
/* clean up */
getch();
closegraph();
return 0;
}
Logged

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK.........
JESUSKANE
Yüzbaşı
**

Rep Puanı : 22


Offline Offline

Cinsiyet: Bay
Konu Sayısı : 55 Mesaj Sayısı: 119

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK


WWW
« Yanıtla #2 : Eylül 21, 2007, 09:25:03 ÖS »

C# ile mp3 dosyası açan program.

//Kodların tamamı şu şekilde..
//Coded by -cod3mast3r-
//special for CİGİCİGİ.COM

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using WMPLauncher;
using WMPLib;

namespace WindowsApplication1
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem7;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.button1 = new System.Windows.Forms.Button();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.SuspendLayout();
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F, ((System.Drawing.Fonts tyle)((System.Drawing.FontSt yle.Bold | System.Drawing.Fonts tyle.Italic))), System.Drawing.GraphicsUnit.Point, ((System.Byte)(162)));
this.button1.ForeColor = System.Drawing.Color.Brown;
this.button1.Image = ((System.Drawing.Image)(resources.GetObject("butto n1.Image") ));
this.button1.Location = new System.Drawing.Point(72, 40);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(160, 160);
this.button1.TabIndex = 0;
this.button1.Text = "Ayyüzlüm.mp3";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[> {
this.menuItem1,
this.menuItem6,
this.menuItem7});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[> {
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5});
this.menuItem1.Text = "Muzikler";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "ayyüzlüm";
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "bla bla";
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "ceza";
//
// menuItem5
//
this.menuItem5.Index = 3;
this.menuItem5.Text = "manga";
//
// menuItem6
//
this.menuItem6.Index = 1;
this.menuItem6.Text = "ÇIK";
//
// menuItem7
//
this.menuItem7.Index = 2;
this.menuItem7.Text = "Yardım";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.button1);
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.Text = "MP3";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);

}
#endregion

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread>
static void Main()
{
Application.Run(new Form1());
}

private void button1_Click(object sender, System.EventArgs e)
{

System.Diagnostics.Process Proc = new System.Diagnostics.Process();
Proc.StartInfo.FileName = "wmplayer.exe";
Proc.StartInfo.CreateNoWindow = true;
Proc.StartInfo.Arguments = "/hide d:\\muzik\\01-ayyüzlüm.mp3"; //siz bunu kendi diskinizdeki mp3 yerel adresiyle değiştireceksiniz. Butonlarıda kafanıza göre ayarlarsınız.

Proc.Start();



}

private void Form1_Load(object sender, System.EventArgs e)
{

}
}
}
______________________________________________

Bu program girdiğiniz sayı aralığında asal sayı olanları çıkartıyo ve toplamını buluyor...

#include<iostream>
#include<math.h>
using namespace std;
void calc(float a,float b)
{
int max,min,j;
int sum=0;
int flag=1;
if(a<b)
{
max=b;
min=a;
}
else
{
max=a;
min=b;
}


for(;min<max;min++){
for(j=2;j<min;j++)
{
if(min%j==0)
{
flag=0;
break;
}
}

if(flag==0)cout<<"this isnt prime"<<min<<endl;
else
sum+=min;


cout<<"this is prime"<<min<<endl;
flag=1;


}
cout<<"sum "<<sum<<endl;
}

int main()
{

float n1,n2;
cout<<"Enter between 2 numbers:"<<endl;
cin>>n1>>n2;

if(n1>0 && n2>0)calc(n1,n2);
else cout<<"u cant use 0 or negative numbers!.. try it again";



system("pause");
return 0;
}
Logged

BÜTÜN MESELE GÖRÜNMEYENİ GÖRÜNÜR KILMAK.........
lord murat
Teğmen
*

Rep Puanı : 0


Offline Offline

Konu Sayısı : 0 Mesaj Sayısı: 2


« Yanıtla #3 : Nisan 22, 2008, 11:49:54 ÖÖ »

bu kodların hepsini sen'mi yazdin.eger  sen yazdıysan helal olsun
Logged
itucan1296
Yüzbaşı
**

Rep Puanı : 2


Offline Offline

Konu Sayısı : 12 Mesaj Sayısı: 110


« Yanıtla #4 : Nisan 22, 2008, 12:51:52 ÖS »

 emeğine sağlık kardeşim yalnız bunun kopyala-yapıştır olduğu çok belli. Ayrıca o kadar uzun ki kimsenin okuyacağını sanmıyorum. Bulabilirseniz programlar ile ilgli e-kitaplar var.. onların linklerini bulun.Ben öyle yapıyorum Kahkaha
Logged
Thekallesh
Teğmen
*

Rep Puanı : 0


Offline Offline

Konu Sayısı : 5 Mesaj Sayısı: 18


« Yanıtla #5 : Haziran 20, 2008, 05:01:25 ÖS »

emeğine sağlık kardeşim yalnız bunun kopyala-yapıştır olduğu çok belli. Ayrıca o kadar uzun ki kimsenin okuyacağını sanmıyorum. Bulabilirseniz programlar ile ilgli e-kitaplar var.. onların linklerini bulun.Ben öyle yapıyorum Kahkaha

olum sen bu ısı daha bılmıosun bunun nesını okucan kı dırek alcan bunu c ıle yapcan zuhaha
Logged
alligator41
Teğmen
*

Rep Puanı : 1


Offline Offline

Konu Sayısı : 8 Mesaj Sayısı: 48


« Yanıtla #6 : Temmuz 06, 2008, 06:37:47 ÖS »

bunlar çok gsl
teşekkür
gerçi programlamadan anlamam ama güzel olduğu belli
Logged
alligator41
Teğmen
*

Rep Puanı : 1


Offline Offline

Konu Sayısı : 8 Mesaj Sayısı: 48


« Yanıtla #7 : Temmuz 06, 2008, 06:43:06 ÖS »

emeğine sağlık kardeşim yalnız bunun kopyala-yapıştır olduğu çok belli. Ayrıca o kadar uzun ki kimsenin okuyacağını sanmıyorum. Bulabilirseniz programlar ile ilgli e-kitaplar var.. onların linklerini bulun.Ben öyle yapıyorum Kahkaha
daha önceden bir yere yazıp toparlayıp kopyalayıp yapıştırmıştır
güzel cümle kurdum Gülümseme
ayrıca tebrikler güzel paylaşım.
Logged
Sayfa: [1]   Yukarı git
Yazdır
Gitmek istediğiniz yer:  


Powered by SMF 1.1.5 | SMF © 2006, Simple Machines LLC



evden eve nakliyat evden eve nakliyat
Reklam vermek için sabotecom@windowslive.com adresine mail gönderiniz. Sabote.com bir forum sitesidir ve siteye gönderilen tüm mesajlar onaydan geçmeksizin anında paylaşılmaktadır. Sabote yönetimi yazılan mesajlardan sorumlu değildir, tüm sorumluluk mesajı yazan kişilere aittir. Yasalara aykırı bulduğunuz mesajları linkleriyle beraber sabotecom@windowslive.com adresine bildirebilirsiniz. Şikayetiniz en kısa sürede incelemeye alınacaktır.. For English: Please let us know any illegal activity to sabotecom@windowslive.com

2008© sabote.com
Bu Sayfa 2.013 Saniyede 21 Sorgu ile Oluşturuldu