- #include<iostream>
- using namespace std;
- int main()
- {
- int answer;
- cout<<"請問windles是哪個公司出的?"<<endl;
- cout<<"(1)googie (2)iphone (3)微軟 (4)Adobe"<<endl;
- cout<<"請回答: ";
- cin>>answer;
- switch(answer)
- {
- case 1:
- cout<<"答錯了"<<endl;
- break;
- case 2:
- cout<<"答錯了他只有用在他的產品"<<endl;
- break;
- case 3:
- cout<<"答對了!!!"<<endl;
- break;
- case 4:
- cout<<"不是喔!"<<endl;
- break;
- default:
- cout<<"都錯 都錯不要再猜了"<<endl;
-
-
-
- }
- system("pause");
- return 0;
- }
複製代碼 |