1. 程式人生 > 其它 >1003: A+B for Input-Output Practice (III)

1003: A+B for Input-Output Practice (III)

技術標籤:WUSTOJ

Description

計算 a + b.

Input

多組測試資料,每組測試資料佔一行,包括2個整數,如果2個整數都為0,則表示測試結束。

Output

每組測試資料佔一行,輸出兩個整數的和。

Sample Input

1 5
10 20
0 0

Sample Output

6
30

Code

#include<iostream>
using namespace std;
int main()
{
    int a,b;
    while(cin>>a>>b)
    {
        if(a!=0&&b!=0)
          cout<<a+b<<endl;
        else
            return 0;
    }
}