返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a,b,c;
  7.     cout<<"第一個數";
  8.     cin>>a;
  9.     cout<<"第二個數";
  10.     cin>>b;
  11.     cout<<"第三個數";
  12.     cin>>c;
  13.     int d=a;
  14.     if(d<b)
  15.     {
  16.       d=b;     
  17.     }
  18.     if(d<c)
  19.     {
  20.       d=c;     
  21.     }
  22.     int e=a;
  23.     if(e>b)
  24.     {
  25.       e=b;     
  26.     }
  27.     if(e>c)
  28.     {
  29.       e=c;     
  30.     }
  31.     int f=a;
  32.     if(f==d||f==e)
  33.     {
  34.       f=b;     
  35.     }
  36.     if(f==d||f==e)
  37.     {
  38.       f=c;     
  39.     }
  40.     cout<<d<<">"<<f<<">"<<e<<endl;
  41.     system("pause");
  42.     return 0;
  43. }
複製代碼

TOP

返回列表