#include <stdio.h> int main() { int a=100; int b=12; //char sum; int sum=a+b; //此句相当于下面二句 //int sum; //sum=a+b; //printf("sum=a+b\n",sum); printf("%d=%d+%d\n",sum,a,b); //printf("%d\n",sum);以整数形式%d输出sum,'\n'表示换行 return 0; }
[此贴子已经被作者于2016-2-26 23:21编辑过]