#include <stdio.h>
int main()
{
int x = 0;
printf("x=%d\n",x);
printf("x=%d\n",x+2);
return 0;
}
int main()
{
int x = 0;
printf("x=%d\n",x);
printf("x=%d\n",x+2);
return 0;
}
2015-01-28
#include <stdio.h>
int main()
{
int x = 0;
printf("x=%d\n",x);
printf("x=%d\n",x+2);
return 0;
}
int main()
{
int x = 0;
printf("x=%d\n",x);
printf("x=%d\n",x+2);
return 0;
}
2015-01-28
int sum = 0; //定义计算结果变量sum
int i = 1; //定义循环数字变量i
int flag = 1; //定义符号状态变量flag
使用for循环
for(i=1;i<=100;i++)
{
flag=-flag;
}
printf("sum=%d\n",sum);
return 0;
}
居然是这样!!!!!我做了将近一个小时。。。。
int i = 1; //定义循环数字变量i
int flag = 1; //定义符号状态变量flag
使用for循环
for(i=1;i<=100;i++)
{
flag=-flag;
}
printf("sum=%d\n",sum);
return 0;
}
居然是这样!!!!!我做了将近一个小时。。。。
2015-01-28
#include <stdio.h>
int main()
{
char c = 'a';
int n = c ; //将c赋值给n
float f = c ; //将c赋值给f
double d = c ; //将c赋值给d
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
int main()
{
char c = 'a';
int n = c ; //将c赋值给n
float f = c ; //将c赋值给f
double d = c ; //将c赋值给d
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
2015-01-28