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/07/12 05:44:47
![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](/uploads/image/z/11628633-57-3.jpg?t=ACM+%E7%AC%AC%E4%B8%80%E9%A2%98%2C%E5%85%A5%E9%97%A8%E7%BA%A7%E5%88%AB%E7%9A%84a%2BbInputThe+input+will+consist+of+a+series+of+pairs+of+integers+a+and+b%2Cseparated+by+a+space%2Cone+pair+of+integers+per+line.OutputForeach+pair+of+input+integers+a+and+b+you+should+output+the+sum+of+a+and+bin+one+line%2Cand+w)
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;
}