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

TOP

返回列表