返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<ctime>
  4. using namespace std;
  5. int main()
  6. {
  7.     string lose[]={"仰臥起坐","跑操場","開合跳","平板支撐","伏地挺身","蛙跳"};
  8.     srand(time(NULL));
  9.     re:
  10.     cout<<"☆★☆ 抽籤程式 ☆★☆"<<endl;
  11.     cout<<"輸的懲罰是什麼?"<<endl<<endl;
  12.     system("pause");
  13.     for(int a=1;a<=20;a++)
  14.     {
  15.        if(a%2==1)
  16.        {
  17.           cout<<"★☆★ 抽籤中 ★☆★"<<endl;
  18.        }
  19.        else
  20.        {
  21.            cout<<"☆★☆ 抽籤中 ☆★☆"<<endl;
  22.        }
  23.        cout<<lose[rand()%6]<<endl<<endl;
  24.        _sleep(250);
  25.        system("cls");
  26.     }
  27.     cout<<"罰:"<<lose[rand()%6]<<endl<<endl;
  28.     system("pause");
  29.     return 0;
  30. }
複製代碼

TOP

返回列表