返回列表 發帖
  1. #include <iostream>;
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,b,c;
  6.     re:
  7.     cout<<"Enter three individual numbers: ";
  8.     cin>>a>>b>>c;
  9.    
  10.    
  11. if(a>b and a>c)
  12. cout<<a<<">"<<b<<">"<<c<<endl;

  13. else if(a>c and c>b)
  14. cout<<a<<">"<<c<<">"<<b<<endl;
  15. else if (a==b && b>c)
  16.         cout<<a<<"="<<b<<">"<<c<<endl;
  17.         
  18. else if (a>b && a==c)
  19.         cout<<a<<">"<<b<<"="<<c<<endl;
  20. else if(b>a && a>c)
  21.         cout<<b<<">"<<a<<">"<<c<<endl;

  22.   
  23.     else if(b>c && c>a)
  24.         cout<<b<<">"<<c<<">"<<a<<endl;

  25. else if (b==c && b>a)
  26.         cout<<b<<"="<<c<<"<"<<a<<endl;
  27. else if (b<c && b==a)
  28.         cout<<b<<"<"<<c<<"="<<a<<endl;
  29.         
  30.     else if(c>a && a>b)
  31.         cout<<c<<">"<<a<<">"<<b<<endl;


  32.     else if(c>b && b>a)
  33.         cout<<c<<">"<<b<<">"<<a<<endl;
  34.         
  35.     else if(c==a && a>b)
  36.                 cout<<c<<"="<<a<<">"<<b<<endl;
  37.     else if (c>a && a==b)
  38.                  cout<<c<<">"<<a<<"="<<b<<endl;
  39.     else if (a==b && b==c)
  40.                  cout<<a<<"="<<b<<"="<<c<<endl;
  41.     else
  42.     cout<<"information out of reach ...."<<endl;
  43.    
  44.     system("pause");
  45.     return 0;
  46. }
複製代碼

TOP

返回列表