- 例1.1要求在屏幕上输出以下一行信息
This is a C program.
#include <stdio.h>
int main()
{
printf("This is a C program.\n");
return 0;
}
例1.2求两个整数之和。
#include <stdio.h>
int main()
{
int a,b,sum;
a=123;
b=456;
sum=a+b;
printf("sum is %d\n",sum);
return 0;
}
#include <stdio.h>
int main()
{
printf("This is a C program.\n");
return 0;
}
例1.2求两个整数之和。
#include <stdio.h>
int main()
{
int a,b,sum;
a=123;
b=456;
sum=a+b;
printf("sum is %d\n",sum);
return 0;
}