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

  4. int main()
  5. {
  6.                 int x;
  7.                 int y;
  8.                 cout << "請輸入第一個數字:";
  9.                 cin >> x;
  10.                 cout << "請輸入第二個數字:";
  11.                 cin >> y;
  12.                 if(x > y)
  13.                 {
  14.                         cout << x << " > " << y <<endl;
  15.                 }
  16.                 else if( y > x )
  17.                 {
  18.                         cout << y << " > " << x <<endl;
  19.                 }
  20.                 else if( y = x )
  21.                 {
  22.                         cout << x << " = " << y <<endl;
  23.                 }
  24.                 system ("pause");
  25.         return 0;
  26. }
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

TOP

返回列表