hdu1000 A+B

A + B Problem

http://acm.hdu.edu.cn/showproblem.php?pid=1000

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.

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;
}

你可能感兴趣的:(HDU,水题)