Merhaba arkadaşlar, aşşağıdaki kodları detaylı bir şekilde açıklayacak arkadaş var mı acaba? İlgilenen olursa şimdiden teşekkür ederim. Kolay gelsin...
int n=0;
float toplam=0.0,sayi;
while(1)
{
scanf("%f" ,&sayi);
if(sayi==0.0) break;
n++;
toplam+=sayi;
}
if(n==0) printf("Herhangi bir deger hesaplanamadı");
else printf("Ortalama: %8.2f" ,toplam );
int a=2, j, x;
for(j=0; j<7; j+=2)
{
x=a>j?a++:a+j;
printf("%d \n" ,x);
}
int a=0, b=6;
do
{
printf("%d %d \n" ,a ,b/2);
}while(++a, b-=a);
int j, k;
for(j=1,k=3; k<=10; k+=2)
{
j+=k;
if(j>7) break;
}
printf("%d %d \n" ,j ,k);
int a, b, c, k;
for(k=0; k<5; k++)
{
if (k==0)a=b=c=0;
if (k==1)a=b=0,c=1;
if (k==2)a=c=1,b=0;
if (k==3)a=c=1,c=0;
if (k==4)a=c=1,c=3;
if (!(a-b))
if (b>=c-a) printf("%d \n", a+(a>=c));
else printf("%d \n" ,a-b&&c);
else printf("%d \n" ,b-c==b);
}
int k, x;
for (k=4; k>0; k--)
{
x=8;
switch(k)
{
case 4: x-=3;
printf("%d \n" ,x);
case 3: x*=3;
printf("%d \n" ,x); break;
case 2: x/=3;
printf("%d \n" ,x);
default: x+=3;
printf("%d \n" ,x);
}
}
int a=5, b=10, c=15;
printf("%d \n" , !(a>5 || c
int a=5, b=10, c=15, d=3;
printf("%d \n" ,c==a+b || !d);
int x=10, y=3, z=5;
printf("%d \n" ,x%y*z);
printf("%d \n" ,x+=y+z);
int x=4, y=4, z;
printf("%d \n" ,z=x++);
printf("%d \n" ,z=++x);
int x=0, y=4, z;
z=++x || (y+=3);
printf("%d %d %d \n" ,x ,y ,z);
int x=0, y=4, z;
z=++x && (y+=3);
printf("%d %d %d \n" ,x, y, z);
int x=0, y=4, z;
z=(y-=4) && --x;
printf("%d %d %d \n" ,x ,y ,z);
int x=4, y=3, z;
z=!x>y+(x==4);
printf("%d %d %d \n " ,x ,y ,z);
int i=11, j=4, k;
float x;
x=i/j+4.5;
printf("%4.3f \n" ,x);
k=i/j+4.5;
printf("%d \n" ,k);
int i=11, j=4;
float x;
x=(float)i/j+(float)(i/j);
printf("%4.3f \n" ,x);
int sayi, sonuc=0, k;
while(1)
{
printf("Sayi gir: ");
scanf("%d" ,&sayi);
if(sayi<0)break;
if(sayi%2) sonuc+=sayi*sayi;
}
printf("Sonuc= %d\n" ,sonuc);
int x=2, y=1, k;
while(x<=5)
{
x+=3/x;
for(k=0; k<4; k++)
{
y++;
if(y%2==0) continue;
else break;
y=3;
}
x++;
}
printf("%d %d \n" ,x ,y);
int a=0, b=0, c=8;
do
{
printf("AA \n");
}
while(++a,b=a+1,c-=a+b);
b=7;
a=!b;
printf("%d \n" ,a+b);
int i;
for(i=1; i<=5;i+=2)
{
switch(i)
{
case 1: printf("A");
case 2: printf("B");
break;
case 3: printf("C");
break;
case 4: printf("D");
default: printf("F");
}
}
int a=0, b=0, c=8;
do
{
printf("AA\n");
}
while(++a,b=a+1,c-=a+b);
b=7;
a=!b;
printf("%d \n" ,a+b);
int i=11, j=4;
float x;
int k;
k=(float) i/j+1.5;
printf("%d\n" ,k);
x=(float) i/j+1.5;
printf("%4.2f\n" ,x);
x=(float) (i/j)+1.5;
printf("%4.2f\n" ,x);
int a=16, b=0;
while (a>2||b<1)
{
printf("AA \n");
a=a/2;
b=b+2;
}
printf("%d %d \n" ,a ,b);
int x, y, z=0;
scanf("%d %d" ,&x ,&y);
if(x || ++z)
if(x && y )z++;
else z +=3;
printf("%d",z);
int x=3, y=1;
if(x!=(2+y))
printf("%d" ,x);
else
{
x=2+y;
printf("%d" ,x);
x=2+y;
}
for(x=y; x<=(4+y); x=x+2)
printf("%d" ,x);
printf("%d" ,x);
Aşşagıdaki her ifadeden önce
int w=1; int x=2; double y=1.0 double z=2.0;
int a=0, b=1, c=0;
verilmiştir buna göre sonuçlar?
x/w*x-w =
(y/z)/(y/z) =
y/z/y/z =
x>1 =
w==2 =
x<9 && (x>1) =
z+5.1>=6.5||x!=y =
w<=x!=y<=z =
!!x =
b+a==c =
--b||++a && c =
!(b+2)?c:a!=7+5 =
a=b+=3 =
c&&++b?a:b =
-5