天天看点

HDU-1000——A+B problem

A+B problem

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

程序分析:因为需要多次输入数据,所以用while循环

AC通过代码:

#include<stdio.h> 

int main() 
{ 
	int i, j;
	while(scanf("%d %d", &i, &j)!=EOF)
	printf("%d\n", i + j);
	return 0;
} 
           

继续阅读