Time limit 1000 msMemory limit 32768 kBOSWindows
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
问题描述:输入a,b,计算a+b的值。
问题链接:https://vjudge.net/problem/hdu-1000?tdsourcetag=s_pctim_aiomsg
问题分析:计算输入的a,b的值并输出。
程序分析:用一个while使程序可以一直运行
#include<iostream>
using namespace std;
int main()
{ int n,m;
while(cin>>n>>m)
cout<<n+m<<endl;
}