返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.    
  7.    
  8.     int x;
  9.     int y;
  10.     cout << "請輸入x的值:" <<endl;
  11.    
  12.     cin>>x;
  13.     cout << "請輸入y的值:" <<endl;
  14.    
  15.     cin>>y;
  16.    
  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.     cout<<"x%y="<<x%y<<endl;
  22.    
  23.     system("pause");
  24.     return 0;
  25. }
複製代碼
回復 1# 周政輝

TOP

返回列表