返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int answer;
  6.     cout<<"Good morning,猜一個中國字?(1)死 (2)玩 (3) 譚 (4)彎" <<endl;
  7.     start:
  8.     cout<<"請作答: ";
  9.     cin>>answer;
  10.     if(answer==1)
  11.     {
  12.         cout<<"你想死ㄚ!!"<<endl;
  13.               goto start;
  14.     }
  15.     else if(answer==2)
  16.     {
  17.          cout<<"不認真作答還玩哩~"<<endl;
  18.               goto start;
  19.     }
  20.     else if(answer==3)
  21.     {
  22.         cout<<"真不容易,答對了!恭喜恭喜"<<endl;
  23.     }
  24.     else if(answer==4)
  25.     {
  26.        cout<<"你要彎去哪裡ㄚ!"<<endl;
  27.               goto start;  
  28.     }
  29.     else
  30.     {
  31.         cout<<"認真一點啦!!中文造詣很爛ㄝ"<<endl;   
  32.         goto start;
  33.     }
  34.      system("pause");
  35.      return 0;   
  36. }
複製代碼

TOP

返回列表