#include <iostream>
using namespace std;
int main(void){
int a,b;
while(cin>>a>>b){
cout <<a+b<<endl;
cout <<a-b<<endl;
cout <<a/b<<endl;
cout <<a*b<<endl;
}
return 0;
}作者: admin 時間: 2011-8-9 11:47
#include <iostream>
using namespace std;
int main()
{
int x;
int y;
cout << "請輸入 x " << endl;
cin >> x;
cout << "請輸入 y " << endl;
cin >> y;
cout << "您輸入的 x 是" << x << " y 是 " << y << endl;
cout << "x + y = " << x + y << endl;
cout << "x - y = " << x - y << endl;
cout << "x * y = " << x * y << endl;
cout << "x / y = " << x / y << endl;
cout << "x % y = " << x % y << endl;
system("pause");
return 0;
}作者: 舜仁 時間: 2011-8-9 11:47