求整数a,b的和。
测试案例有多行,每行为a,b的值。
输出多行,对应a+b的结果。
1 2 4 5 6 9
3 9 15
#include<iostream> using namespace std; int main(){ int a,b; while(cin>>a && cin>>b){ cout<<a+b<<endl; } } /************************************************************** Problem: 1000 User: hg2013211626 Language: C++ Result: Accepted Time:0 ms Memory:1520 kb ****************************************************************/
原文:http://www.cnblogs.com/huanggen/p/5323166.html