实验1.1 Visual C++2010 学习环境下, 在屏幕显示"hello world"
#include <stdio.h>
int main()
{
printf("Hello, world!\n");
system("pause");
return 0;
}
实验1.3 建立第二个程序“add.c”并保存
即实现加法运算:
#include <stdio.h>
int main()
{
int a, b, c;
printf("Enter a, b= ");
scanf("%d %d", &a, &b);
c = a + b;
printf("%d + %d = %d\n", a, b, c);
system("pause");
return 0;
}