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

  4. int main()
  5. {
  6.     int x,y;
  7.    
  8.     cout<<"請輸入 X:"<<endl;
  9.     cin>>x;
  10.     cout<<"請輸入 y:"<<endl;
  11.     cin>>y;
  12.    
  13.    
  14.    
  15.     cout<<"當x等於"<<x<<",y等於"<<y<<endl;
  16.     cout<<"X+Y="<<x+y<<endl;
  17.     cout<<"X-Y="<<x-y<<endl;
  18.     cout<<"X*Y="<<x*y<<endl;
  19.     cout<<"X/Y="<<x/y<<endl;
  20.     cout<<"X%Y="<<x%y<<endl;
  21.    
  22.     system("pause");
  23.     return 0;
  24. }
複製代碼

TOP

返回列表