返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int x,y,z;
  7.     cout<<"請任意輸入三個數:";
  8.     cin>>x>>y>>z;
  9.     if(x>y && y>z)
  10.     {
  11.      cout<<"x>y>z"<<endl;      
  12.     }
  13.     else if(x>z && z>y)
  14.     {
  15.      cout<<"x>z>y"<<endl;      
  16.     } else if(y>z && z>x)
  17.     {
  18.      cout<<"y>z>x"<<endl;      
  19.     } else if(y>x && x>z)
  20.     {
  21.      cout<<"y>x>z"<<endl;      
  22.     }else if(z>x && x>y)
  23.     {
  24.      cout<<"z>x>y"<<endl;      
  25.     }else if(z>y && y>x)
  26.     {
  27.      cout<<"z>y>x"<<endl;      
  28.     }else if(x=y>z)
  29.     {
  30.      cout<<"x=y>z"<<endl;      
  31.     }else if(x=z && z>y)
  32.     {
  33.      cout<<"x=z>y"<<endl;      
  34.     }else if(z=y && y>x)
  35.     {
  36.      cout<<"z=y>x"<<endl;            
  37.     }
  38.      else
  39.      {
  40.       cout<<"x=y=z"<<endl;      
  41.       }
  42.    
  43. system("pause");
  44. return 0;
  45. }
複製代碼

TOP

返回列表