#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i;
int num=0,num1=0;
cout<<"請輸入第一個數:";
cin>>num;
cout<<"請輸入第二個數:";
cin>>num1;
cout<<"1=+,2=-,3=*,4=/,請輸入1234:";
cin>>i;
if(i==1){
cout<<num+num1;
}
else if(i==2){
cout<<num-num1;
}
else if(i==3){
cout<<num*num1;
}
else if(i==4){
cout<<num/num1;
}
system("pause");
return 0;
} |