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

 

文章標籤
全站熱搜