返回列表 發帖
本帖最後由 譚暐霖 於 2016-11-12 15:19 編輯
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. re:
  7.     int a,b,c;
  8.     cout<<"Please enter a number for a: "<<endl;
  9.     cin>>a;
  10.     cout<<"Please enter another number for b: "<<endl;
  11.     cin>>b;
  12.     cout<<"Please enter another number for c: "<<endl;
  13.     cin>>c;
  14.       if(a>b>c)
  15.         cout<<"a>b>c"<<endl;
  16.     else if(a>c>b)
  17.         cout<<"a>c>b"<<endl;
  18.     else if(a>c>b)
  19.         cout<<"a>c>b"<<endl;
  20.     else if(b>c>a)
  21.         cout<<"b>c>a"<<endl;
  22.     else if(c>a>b)
  23.         cout<<"c>a>b"<<endl;
  24.     else
  25.         cout<<"c>b>a"<<endl;
  26.       
  27. goto re;     
  28.     system("pause");
  29.     return 0;
  30.    
  31. }
複製代碼

TOP

返回列表