- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int ans;
- cout<<"蘋果的英文是:(1)apple,(2)book,(3)banana"<<endl;
- cin>>ans;
- switch (ans)
- {
- case 1:
- cout<<"答對啦!"<<endl;
- break;
- case 2:
- cout<<"答錯了...正確是(1)喔"<<endl;
- break;
- case 3:
- cout<<"答錯了...正確是(1)喔"<<endl;
- break;
- default:
- cout<<"沒有這個答案喔"<<endl;
- }
-
- system("pause");
- return 0;
- }
複製代碼 |