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

TOP

返回列表