Problem Description

請寫一個程式,讀入兩個數字,並求出它們的和。

Input Format

每一組輸入有兩個整數(int)

Output Format

輸出該兩整數的和(int)

Sample Input

5     10
1     2

Sample Output

15
3


-----*Problem from【ZeroJudge, An Online Judge System For Beginners

 

My Answer

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
#include<iostream>
using namespace std;
int main(void)
{
   int n, m;
   while(cin>>n>>m){
      cout<<n+m<<endl;
   }
   return 0;
}


 


arrow
arrow
    全站熱搜

    兔老大 發表在 痞客邦 留言(0) 人氣()