- #include<iostream>
- using namespace std;
- int main()
- {
- re:
- char d;
- cout<<"<小米的腦殘問題>"<<endl;
- cout<<"請問豬有幾隻腳?<A>1隻<B>2隻<C>3隻<D>4隻"<<endl;
- cout<<"請輸入:";
- cin>>d;
- switch(d)
- {
- case 'A':
- case 'a':
- cout<<"用跳的嗎"<<endl;
- break;
- case 'B':
- case 'b':
- cout<<"沒吃過豬肉也看過豬走路"<<endl;
- break;
- case 'C':
- case 'c':
- cout<<"你是豬嗎"<<endl;
- break;
- case 'D':
- case 'd':
- cout<<"正確"<<endl;
- break;
- default:
- cout<<"請不要亂輸入"<<endl;
- }
- goto re;
- system("pause");
- return 0;
- }
複製代碼 |