- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int object;
- cout<<"(1)小火龍(2)傑尼龜(3)妙娃種子"<<endl;
- cout<<"請挑選你的搭檔:";
- cin>>object;
- switch(object)
- {
- case 1:
- cout<<"恭喜獲得:小火龍"<<endl;
- break;
- case 2:
- cout<<"恭喜獲得:傑尼龜"<<endl;
- break;
- case 3:
- cout<<"恭喜獲得:妙娃種子"<<endl;
- break;
- default:
- cout<<"好的,都不要"<<endl;
- }
- system("pause");
- return 0 ;
- }
複製代碼 |