返回列表 發帖
  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:z;
  11.     tmp = (tmp>z)?tmp:z;
  12.     cout<<"三數中最大的數為:"<<tmp<<endl;
  13.    
  14.    
  15.    goto re;
  16. system("pause");
  17. return 0;   
  18.    
  19. }
複製代碼

TOP

返回列表