返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.    
  8.     float  a,b,c,e,f;
  9.    
  10.     cout<<"請輸入3個數:";
  11.     cin>>a>>b>>c;
  12.    
  13.     e=a>b?a:b;
  14.     f=c>e?c:e;
  15.    
  16.     cout<<"3數中最大的數為: "<<f<<endl<<endl;
  17.    
  18.     cout<<endl;
  19.    
  20.     goto re;
  21.             
  22.     system("pause");
  23.     return 0;
  24. }
複製代碼

TOP

返回列表