返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int x,y,z,tmp;
  7.     cout<<"請輸入三個整數:";
  8.     cin>>x>>y>>z;
  9.     tmp=(x>y)?x:y;
  10.     tmp=(tmp>z)?tmp:z;
  11.     cout<<"三個整數中最大的數是:"<<tmp<<endl;
  12.     system("pause");
  13.     return 0;
  14. }
複製代碼

TOP

返回列表