Üye Ol Forum Kuralları Üye Listesi Takvim Forumları Okundu İşaretle

Cevap
 
Konu Araçları Gösterim Biçimleri
Eski 27.07.2007   #1 (permalink)
Yusuf
art of bodybuilding
 
Yusuf  Görüntü Resmi
 
Üye No: 164433
Katılma Tarihi: Oct 2006
Mesajlar: 428
Yusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond repute
Thumbs up C# \ C++ Örnek Kodlar

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);
}
__________________
Herkes halâ artis ve ben halâ yönetmenim !


Rekabet etmem, takip edilirim.




Yusuf Şuanda Forumda Değil   Alıntı yaparak cevapla
Yusuf isimli üyenin bu mesajına teşekkür edenler:
staticiation (27.07.2007)
Eski 27.07.2007   #2 (permalink)
Yusuf
art of bodybuilding
 
Yusuf  Görüntü Resmi
 
Üye No: 164433
Katılma Tarihi: Oct 2006
Mesajlar: 428
Yusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond repute
Varsayılan

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;
}
__________________
Herkes halâ artis ve ben halâ yönetmenim !


Rekabet etmem, takip edilirim.




Yusuf Şuanda Forumda Değil   Alıntı yaparak cevapla
Eski 27.07.2007   #3 (permalink)
Yusuf
art of bodybuilding
 
Yusuf  Görüntü Resmi
 
Üye No: 164433
Katılma Tarihi: Oct 2006
Mesajlar: 428
Yusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond reputeYusuf has a reputation beyond repute
Varsayılan

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;
}
__________________
Herkes halâ artis ve ben halâ yönetmenim !


Rekabet etmem, takip edilirim.




Yusuf Şuanda Forumda Değil   Alıntı yaparak cevapla
Yusuf isimli üyenin bu mesajına teşekkür edenler:
41AFU52 (28.02.2008)
Eski 29.01.2008   #4 (permalink)
entegre
 
Üye No: 168535
Katılma Tarihi: Aug 2007
Mesajlar: 38
entegre is a jewel in the roughentegre is a jewel in the roughentegre is a jewel in the rough
Varsayılan

dersler için teşekkürler
dehişik dersleri ve örneklerini bekliyorum
entegre Şuanda Forumda Değil   Alıntı yaparak cevapla
Eski 28.02.2008   #5 (permalink)
41AFU52
 
Üye No: 182337
Katılma Tarihi: Feb 2008
Yaş: 22
Mesajlar: 1
41AFU52 is a jewel in the rough41AFU52 is a jewel in the rough41AFU52 is a jewel in the rough
Varsayılan

arkadasım programlar için çok sagol emeğin için teşekkürler
41AFU52 Şuanda Forumda Değil   Alıntı yaparak cevapla
Eski 22.04.2008   #6 (permalink)
delü murat
 
Üye No: 111810
Katılma Tarihi: Mar 2007
Yaş: 20
Mesajlar: 48
delü murat is a jewel in the roughdelü murat is a jewel in the roughdelü murat is a jewel in the rough
Varsayılan

çok saol da çok uzun yoldan yapımışın ya az kısaltsadın
delü murat Şuanda Forumda Değil   Alıntı yaparak cevapla
Eski 06.06.2008   #7 (permalink)
Tcrubuyuuie
 
Üye No: 218281
Katılma Tarihi: Jun 2008
Mesajlar: 4
Tcrubuyuuie is a jewel in the roughTcrubuyuuie is a jewel in the roughTcrubuyuuie is a jewel in the rough
Wink Interruption

The fine-furniture store where I work has been in business since the 1920s. Recently I received a call from a woman who wanted to replace some chairs from a dining set purchased from us in the 1930s. I assured her we could help and sought the assistance of the office manager. "You'll never believe this one, " I told him." I just got a call from a customer who bought some chairs from us in the 1930s. " Before I could finish repeating her request, he interrupted and said, "Don't tell me she hasn't received them yet!" ----------------------------------Looking to buy wow gold? Do you look for cheap wow gold? Welcome to our website:1.wow gold,2.wow gold,3.wow gold,4.wow gold,5.wow gold.
__________________
A wow power leveling website
Tcrubuyuuie Şuanda Forumda Değil   Alıntı yaparak cevapla
Cevap
Etiketler: ,


Bookmarks


Şu Anda Konuyu İnceleyen Aktif Kullanıcılar: 1 (0 üye ve 1 misafir)
 
Konu Araçları
Gösterim Biçimleri

Gönderme Kuralları
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is Açık
[IMG] kodu Açık
HTML kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Kapalı

Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Örnek Evlilik b.girldilek Geyik 3 20.06.2007 18:11
Kara Kalem çalişmalarimdan Bir örnek perfect_232 Fotoğraf ve Resim Galerisi 19 06.06.2007 15:17
VB Başlangıç(Anlatım+Örnek)... staticiation Programlama & Geliştiriciler için 2 02.06.2007 18:09
VB Basic (anlatım+Örnek)... staticiation Programlama & Geliştiriciler için 0 02.06.2007 17:05
Örnek abi TuRK_ScReaM Fıkra 0 16.05.2006 16:14

Şu anki forum saati: 08:05.

 

cnt hizmet sağlayan firma
ForumTi.com'un yapımı ve yayınlanması CNT'ye aittir.
Sitedeki içerikleri foruma ücretsiz şekilde üye olabilen ziyaretçiler oluşturur. Bu içeriklerin sorumluluğu yazana aittir.
Eğer yasak ve aykırı içerik tespit edilirse site yöneticilerine bu konular bildirilir ve kaldırılır. Site yönetimi haberdar edildiğinde sonuç alınamaz ise servis sağlayıcı CNT'ye bildiride bulunabilirsiniz.


Powered by vBulletin
Copyright © 2000-2006 Jelsoft Enterprises Limited

Search Engine Optimization by vBSEO 3.0.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205