返回列表 發帖
本帖最後由 林宇翔 於 2014-3-29 15:13 編輯
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.                 int a;
  7.                 int b;
  8.                 int c;
  9.                 int e;
  10.                 int f;
  11.                 int g;
  12.                 cout << "請輸入第一個數字:";
  13.                 cin >> a;
  14.                 cout << "請輸入第二個數字:";
  15.                 cin >> b;
  16.                 cout << "請輸入第三個數字:";
  17.                 cin >> c;
  18.                 e= (a > b)? a : b;
  19.                 f= (b > c)? b : c;
  20.                 g= (e > f)? e : f;
  21.                 cout << "最大值" << g <<endl;
  22.                 system ("pause");
  23.         return 0;
  24. }
複製代碼

TOP

返回列表