1. 程式人生 > >C++ 多組輸入計算a+b

C++ 多組輸入計算a+b

多組輸入計算a+b 原始碼:

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

程式截圖: