[quote][/quote]#include <iostream>
#include<cstdlib>
using namespace std;
int main()
{
cout<<"請輸入x的值"<<endl;
cout<<"請輸入y的值"<<endl;
int x=0;
int y=0;
cin>>x;
cin>>y;
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;
}作者: 蘇昱全 時間: 2017-8-2 09:57
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int x=0;
int y=0;
cout<<"輸入x的值"<<endl;
cin>>x;
cout<<"輸入y的值"<<endl;
cin>>y;
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;
}
複製代碼
作者: 陳智鈞 時間: 2017-8-2 09:58
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int X=1234;
int Y=567;
cout<<"請輸入X的值"<<endl;
cout<<"請輸入Y的值"<<endl;
cin>>X;
cin>>Y;
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;
}
複製代碼
作者: 石庭禎 時間: 2017-8-2 09:59
#include <cstdlib>
#include <iostream>
using namespace std;
int main()
{
int X=1234;
int Y=567;
cout<<"請輸入X的值"<<endl;
cout<<"請輸入Y的值"<<endl;
cin>>X;
cin>>Y;