1. 程式人生 > >HDU-1000——A+B problem

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