杭电ACM1000

来源:互联网 发布:linux 脚本 批量执行 编辑:程序博客网 时间:2024/05/13 19:22

Problem Description
Calculate A + B.
 
Input
Each line will contain two integers A and B. Process to end of file.
 
Output
For each case, output A + B in one line.
 
Sample Input
1 1
 
Sample Output
2
 
Author
HDOJ
杭电ACM1000呢是第一题,所以比较的简单(虽然博主也是去百度的答案o(╥﹏╥)o)

好啦,话不多说,答案如下:

#include<iostream>

using namespace std;

int main(){
int a,b;

while(cin>>a>>b){

cout<<a+b<<endl;

}

return 0;

}

原创粉丝点击