返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main(){
  5.    re:
  6.    int x,y,z,a,b;
  7.    cout<<"請依序輸入三個整數"<<endl;
  8.    cin>>x>>y>>z;
  9.    a=x>y?x:y;
  10.    b=a>z?a:z;
  11.    cout<<"三數中最大的是"<<b<<endl;
  12. goto re;

  13. system("pause");
  14. return 0;
  15. }
複製代碼

TOP

返回列表