A+B Problem
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.
Code
#include<stdio.h>
int main()
{
int a,b,sum;
while(scanf("%d %d",&a,&b)!=EOF)
{
sum=a+b;
printf("%d\n",sum);
}
return 0;
}
Attention
键盘输入CTRL+Z就是输入文件结束符。
posted on 2018-07-22 08:37 Joanna_zero 阅读(141) 评论(0) 编辑 收藏 举报