A+B Problem
時間限制:3000 ms | 內存限制:65535 KB
難度:0
- 描述
- 此題爲練手用題,請大家計算一下a+b的值.
- 輸入
- 輸入兩個數,a,b
- 輸出
- 輸出a+b的值
- 樣例輸入
2 3
- 樣例輸出
5
代碼:
#include<iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
cout<<a+b<<endl;
}
return 0;
}
2 3
5
代碼:
#include<iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
cout<<a+b<<endl;
}
return 0;
}