返回列表 發帖
  1. #include<cstdlib>
  2. #include<iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a,b,c;
  7.     cin>>a;
  8.     cin>>b;
  9.     cin>>c;
  10.     if(c==1)
  11.     {
  12.     cout<<a<<"+"<<b<<"="<<a+b<<endl;        
  13.     }
  14.     if(c==2)
  15.     {
  16.     cout<<a<<"-"<<b<<"="<<a-b<<endl;        
  17.     }
  18.     if(c==3)
  19.     {
  20.     cout<<a<<"*"<<b<<"="<<a*b<<endl;        
  21.     }if(c==4)
  22.     {
  23.     cout<<a<<"/"<<b<<"="<<a/b<<endl;        
  24.     }
  25.      system("pause");
  26.     return 0;   
  27. }
複製代碼

TOP

返回列表