返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int a,b,c,d,e;
  6.     cout<<"請輸入第一個數:";
  7.     cin>>a;
  8.     cout<<"請輸入第二個數:";
  9.     cin>>b;
  10.     cout<<"請輸入第三個數:";
  11.     cin>>c;
  12.     d=(a>b)?a:b;
  13.     e=(d>c)?d:c;
  14.     cout<<"三數中較大的數為"<<e;
  15.     cout<<endl;
  16.     system("pause");
  17.     return 0;
  18. }
複製代碼

TOP

返回列表