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

TOP

返回列表