返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int a, s;
  6.    
  7.    stare:
  8.    cout<<"  "<<endl;
  9.    cout<<"腦殘的腦殘問答!!!!! "<<endl;
  10.    cout<<"(一)請問位什麼某故事中那位樵夫要說他掉的是普通的斧頭?"<<endl;
  11.    cout<<"(1)因為它想要拿金銀斧頭(2)他很誠實(3)他不是人(4)他會預知未來"<<endl;
  12.       cin>>a;
  13.    
  14.    if(a==1)
  15.    {
  16.        cout<<"笨蛋才不想拿(恭喜你答對了)!!!!"<<endl;           
  17.    }
  18.    else if(a==2)
  19.    {
  20.       cout<<"鬼才誠實!!!!"<<endl;
  21.         goto stare;           
  22.    }
  23.    else if(a==3)
  24.    {
  25.        cout<<"!!!!(驚)"<<endl;
  26.         goto stare;         
  27.    }
  28.    else if(a==4)
  29.    {
  30.         cout<<"神人阿!!!!"<<endl;
  31.         goto stare;         
  32.    }
  33.    else
  34.    {
  35.        cout<<"您撥的電話是空號,請不要在撥謝謝。"<<endl;
  36.         goto stare;
  37.    }
  38.    
  39.    
  40.    cout<<"腦殘的腦殘問答!!!!! "<<endl;
  41.    stare2:
  42.    cout<<"(二)請問鬼有幾隻腳?(1)100隻(2)5隻(3)4隻(4)不知道"<<endl;
  43.       cin>>s;
  44.    

  45.    switch(s)
  46.    {
  47.     case 1:
  48.         cout<<"蜈蚣幽靈!!!!"<<endl;
  49.         goto stare2;
  50.         break;               
  51.     case 2:
  52.         cout<<"你看過五隻腳的動物嗎??"<<endl;
  53.         goto stare2;
  54.         break;            
  55.     case 3:
  56.         cout<<"原來你是鬼!!!?"<<endl;
  57.         goto stare2;
  58.         break;
  59.     case 4:
  60.         cout<<"誠實的孩子你掉的是金斧頭還是銀斧頭!(大誤)"<<endl;   
  61.         break;                 
  62.     default:
  63.         cout<<"鬼阿!~~~~~~~~"<<endl;      
  64.     } goto stare2;
  65.    
  66.    system("pause");
  67.    return 0;     
  68. }
複製代碼

TOP

返回列表