- #include<iostream>
- #include<cstdlib>
- #include<ctime>
- using namespace std;
- int main()
- {
- string lose[]={"仰臥起坐","跑操場","開合跳","平板支撐","伏地挺身","蛙跳"};
- srand(time(NULL));
- re:
- cout<<"☆★☆ 抽籤程式 ☆★☆"<<endl;
- cout<<"輸的懲罰是什麼?"<<endl<<endl;
- system("pause");
- for(int a=1;a<=20;a++)
- {
- if(a%2==1)
- {
- cout<<"★☆★ 抽籤中 ★☆★"<<endl;
- }
- else
- {
- cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;
- }
- cout<<lose[rand()%6]<<endl<<endl;
- _sleep(250);
- system("cls");
- }
- cout<<"罰:"<<lose[rand()%6]<<endl<<endl;
- system("pause");
- return 0;
- }
複製代碼 |