杭电1090(今天的汗水会是你明天的成长)

Problem Description
Your task is to Calculate a + b.
Input
Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input. 
Sample Input
2 1 5 10 20
 Sample Output
6 30
问题描述

你的任务是计算a + b。

输入

输入的第一行包含一个整数N,N,然后行。每一行包含一个整数a和b,之间用一个空格来分隔,每行一对整数。

输出

对于每一对输入整数a和b,你应该输出的总和a和b在一行,和一行输出输入的每一行

样例输入

2

1 5

10 20

样例输出

6

30

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

posted on 2015-04-20 16:03  Randy77  阅读(197)  评论(0编辑  收藏  举报

导航