返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.    
  8.     string str="";
  9.     float age;
  10.    
  11.     cout<<"請輸入年齡:";
  12.     cin>>age;
  13.     str=age>=18?"可考駕照":"未滿18歲";
  14.     cout<<str<<endl;
  15.    
  16.     goto re;
  17.             
  18.     system("pause");
  19.     return 0;
  20. }
複製代碼

TOP

返回列表