A + B Problem

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
问题链接:https://vjudge.net/problem/hdu-1000?tdsourcetag=s_pctim_aiomsg
问题简述:对多种情况的A+B进行加法运算
问题分析:
1.A+B
2.多种情况且不确定什么时候结束 采用while循环来输入多种可能的情况

程序说明:
程序如下:

#include
using namespace std;
int main()
{
    int A, B;
    while (cin >> A >> B)
    {
        cout << A + B << endl;
    }
}

你可能感兴趣的:(A + B Problem)