# include <stdio.h>
void main ()
{
int a,y;
a=10;y=0;
do {
a+=2;
y+=a;
if (y>50)break;
printf ("a=%d y=%d\n",a,y);
}while (a=14);
printf ("a=%d y=%d\n",a,y);
}
a=12 y=12
a=16 y=28
a=16 y=44
a=16 y=60
why the result is not 18,60
# include <stdio.h>
void main ()
{
int a,i;
for (a=1,i=-1;-1<=i<1;i++)
{
a++;printf ("%2d",a);
}
printf ("%2d",i);
}
#include<stdio.h>
void main()
{
int i=5;
do {
switch (i%2)
{
case 4:i--;break;
case 6:i--;continue;
}
i--;i--;
printf ("%d",i);
}while (i>0);
}
I don't understand at all,I hope you can explain it to me >_<