问题来源

aj1000

问题描述

Calculate A + B.

输入

Each line will contain two integers A and B. Process to end of file.

输出

For each case, output A + B in one line

例子

aj HDU - 1000--A + B Problem

AC的代码

#include <cstdio>
int main()
{
	int a, b;
	while (scanf("%d%d", &a, &b) != EOF)
	{
		printf("%d\n", a + b);
	}
	return 0;
}

解题思路

输入a,b。
循环输入a,b。
输出a+b并换行。
知道EOF。

相关文章: