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
解题思路
无
注意题目中提到Process to end of file,即处理到文件结尾。除此之外,还要注意换行。
AC代码
#include<cstdio>
int main()
{
int a,b;
while(scanf("%d %d",&a,&b)!=EOF)
{
printf("%d\n",a+b);
}
return 0;
}