- #include <iostream>
- using namespace std;
- int main()
- {
- int answer;
- cout<<"猜猜someone今年心智年齡幾歲?"<<endl;
- cout<<"(1) 1歲 (2) 13歲 (3) 20歲 (4) 40歲"<<endl;
- cin>>answer;
- cout<<endl;
- switch (answer)
- {
- case 1:
- cout<<"有那麼年輕嗎!";
- break;
- case 2:
- cout<<"賓果!你答對了!";
- break;
- case 3:
- cout<<"沒有那麼老啦!";
- break;
- case 4:
- cout<<"你是來亂的喔!";
- default:
- cout<<"輸入錯誤";
- }
- system("pause");
- return 0 ;
- }
-
複製代碼 |