ACM 第一题,入门级别的a+bInputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputForeach pair of input integers a and b you should output the sum of a and bin one line,and w
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 15:30:56
ACM 第一题,入门级别的a+bInputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputForeach pair of input integers a and b you should output the sum of a and bin one line,and w
ACM 第一题,入门级别的a+b
Input
The input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.
Output
For
each pair of input integers a and b you should output the sum of a and b
in one line,and with one line of output for each line in input.
Sample Input
1 5
10 20
Sample Output
6
30
求源代码
ACM 第一题,入门级别的a+bInputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputForeach pair of input integers a and b you should output the sum of a and bin one line,and w
#include
int main(){
int a,b;
while(~scanf("%d%d",&a,&b)){
printf("%d\n",a+b);
}
return 0;
}