A+B
2018-12-09 本文已影响0人
李耳_9992
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
多个数据输入,求和
换行输出
#include<stdio.h>
int main()
{
int A, B,C;
while (~scanf("%d%d", &A, &B))
{
C = A + B;
printf("%d\n", C);
}
}