A + B Problem
[url]http://acm.hdu.edu.cn/showproblem.php?pid=1000[/url]
Problem Description
Calculate A + B.
Input
Each line will contain two integers A and B. [b][color=red]Process to end of file.[/color][/b]
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2
解题思路
这里最阴毒的一句已经在题目中用红色粗体标出了。
[url]http://acm.hdu.edu.cn/showproblem.php?pid=1000[/url]
Problem Description
Calculate A + B.
Input
Each line will contain two integers A and B. [b][color=red]Process to end of file.[/color][/b]
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2
解题思路
这里最阴毒的一句已经在题目中用红色粗体标出了。
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char const* argv[])
{
int a, b;
while (scanf("%d %d", &a, &b) != EOF) {
printf("%d\n", a+b);
}
return 0;
}