A+B for Input-Output Practice (I)

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

Problem Description
Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners.
You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.

Input
The input will consist of a series of pairs 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

1 5
10 20


Sample Output

6

30

-----------------------------------------------------

A+B for Input-Output Practice (I)
 1 #include <iostream>
 2 using namespace std;
 3 
 4 int main()
 5 {
 6     int m,n;
 7     while (cin >> m >> n)
 8         cout << m+n << endl;
 9     return 0;
10 }
A+B for Input-Output Practice (I)

 





本文转自夏雪冬日博客园博客,原文链接:http://www.cnblogs.com/heyonggang/archive/2012/12/11/2813130.html,如需转载请自行联系原作者


上一篇:php中的include和require的区别


下一篇:Android Jxl读写Excel