返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int x, y;
  6.     cout<<"請輸入x: ";
  7.     cin>>x;
  8.     cout<<"請輸入y: ";
  9.     cin>>y;
  10.     cout<<"您輸入的x為"<<x<<", y為"<<y<<endl;
  11.     if(x>y)
  12.     {
  13.         cout<<"x 大於 y"<<endl;   
  14.     }else if(x<y)
  15.     {
  16.         cout<<"x 小於 y"<<endl;
  17.     }else
  18.     {
  19.         cout<<"x 等於 y"<<endl;
  20.     }
  21.     system("pause");
  22.     return 0;   
  23. }
複製代碼

TOP

返回列表