返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.    int a;
  7.    int b;
  8.   
  9.    
  10.    cout<<"請輸入一個數並按enter:";
  11.    cin>>a;
  12.    cout<<"請在輸入一個數並按enter:";
  13.    cin>>b;
  14.    cout<<a<<"加"<<b<<"等於"<<a+b<<endl;
  15.    cout<<a<<"減"<<b<<"等於"<<a-b<<endl;
  16.    cout<<a<<"乘"<<b<<"等於"<<a*b<<endl;
  17.    cout<<a<<"除"<<b<<"等於"<<a/b<<"..."<<a%b<<endl;
  18.    
  19.    
  20.    
  21.    
  22.    system("pause");
  23.    return 0;
  24. }
複製代碼

TOP

返回列表