返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.         re:
  7.         int a,b,c;
  8.         cout<<"請任意輸入三個數字: ";
  9.         cin>>a>>b>>c;
  10.         if(a>b && b>c)
  11.         {
  12.                 cout<,a<<">"<<b<<">"<<c<<endl;
  13.         }else if(a>c && c>d)
  14.         {
  15.                 cout<<a<<">"<<c<<">"<<b<<endl;
  16.         }else if(b>a && a>c)
  17.         {
  18.                 cout<<b<<">"<<a<<">"<<c<<endl;
  19.         }else if(b>c && c>a)
  20.         {
  21.                 cout<<b<<">"<<c<<>">"<<a<<endl;
  22.         }else if(c>a && a>b)
  23.         {
  24.                 cout<<c<<">"<<a<<">"<<b<<endl;
  25.         }else if(c>d && b>a)
  26.         {
  27.                 cout<<c<<">"<<b<<">"<<a<<endl;
  28.         }else
  29.             cout<<"其中兩個數,或三個數相等!"<<endl;
  30.         goto re:
  31.         system("pause");
  32.         return 0;
  33. }
複製代碼

TOP

返回列表