返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     string n[5]={"齊爾","甲蟲","悟空","兔子","瑟斐斯"};
  7.     srand(time(NULL));
  8.     cout<<"☆★☆抽籤程式☆★☆"<<endl;
  9.     cout<<"今天你要玩什麼角色?"<<endl;
  10.     system("pause");  
  11.     system("cls");   
  12.       
  13.    
  14.     for(int i=1;i<=50;i++)  
  15.     {
  16.        if(i%2==1)
  17.        {
  18.            cout<<"☆★☆抽籤中☆★☆"<<endl;
  19.        }else
  20.        {
  21.            cout<<"★☆★抽籤中★☆★"<<endl;
  22.            cout<<"是:"<<n[rand()%5]<<endl;
  23.        }
  24.       if(i<30)
  25.         _sleep(50);
  26.       else
  27.         _sleep(50+(i-30)*(i-30));
  28.         system("cls");
  29.     }
  30.     cout<<"選中的角色是:"<<n[rand()%5]<<endl;   
  31.    
  32.     system("pause");
  33.     return 0;
  34. }
複製代碼

TOP

返回列表