题目1000:计算a+b

来源:互联网 发布:js 鼠标点击事件 编辑:程序博客网 时间:2024/05/16 01:21
题目描述:

求整数a,b的和。

输入:

测试案例有多行,每行为a,b的值。

输出:

输出多行,对应a+b的结果。

样例输入:
1 24 56 9
样例输出:
3915
来源:
九度Online Judge测试题
#include<iostream>#include<fstream>using namespace std;int main(){  //输入设备修改为文件   //ifstream cin("a.txt");  int a,b;  //从输入设备中读取两个整数   while(cin>>a>>b){    cout<<a+b<<endl;    }  ///fflush(stdin);  //getchar();  return 0;                                                        }

原创粉丝点击