1. 程式人生 > >ACM訓練題-第四題-A + B Problem

ACM訓練題-第四題-A + B Problem

Time limit1000 msMemory limit32768 kB
total:Memory 1792kB

Calculate A + B .
Input
Each line will contain two integers A and B . Process to end of file.
Output
For each case, output A + B in one line.
Sample Input
1 1
Sample Output
2
問題連結:https://vjudge.net/problem/hdu-1000?tdsourcetag=s_pctim_aiomsg
問題簡述:計算a+b
程式說明:a+b的演算法
AC通過的C++語言程式如下:

#include <iostream>
using namespace std;
int main()
{
	int i,j,sum;
	while (cin >> i >> j)
	{
		sum = i + j;
		cout << sum<<endl;
	}

}