上机内容:c++程序的编写和运行
上机目的:掌握简单的c++的程序的编缉、编译、连接和运行的一般过程
#include <iostream>
using namespace std;
int main()
{
int a,b,sum,sub;
cout<<"输入两个数:";
cin>>a>>b;
sum=a+b;
sub=a-b;
cout<<"a+b="<<sum<<endl;
cout<<"a-b="<<sub<<endl;
return 0;
}
心得体会:
第一次c++让我感受到了它的魅力和奥秘,希望以后可以学会更多的程序