题目:
Calculate A + B.
Input Each li
ne will contain two integers A and B. Process to end of file.
Output
For each case, output A + B in one line.
题解:首先定义int类型的A,B,用while循环输入A,B,最后输出A+B的值。
#include<iostream>
using namespace std;
int main()
{
int A, B;
while(cin >> A >> B)
{
cout << A + B << endl;
}
return 0;
}