返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     while(true)
  7.     {
  8.     int girl1=0, girl2=0, girl3=0, girl4=0, LOL=0;
  9.     system("cls");
  10.     cout<<"賽跑場"<<endl;
  11.     cout<<"----------------------------------------------------------------|你終於到了"<<endl;
  12.     cout<<"♀瓦搭溪"<<endl;
  13.     cout<<"♀洪珝喬"<<endl;
  14.     cout<<"♀黃脩涵"<<endl;
  15.     cout<<"♀陳采蘊"<<endl;
  16.     system("pause");
  17.     system("cls");
  18.    
  19.     while(girl1!=61 && girl2!=61 && girl3!=61 && girl4!=61)
  20.     {
  21.         LOL=rand()%4;   
  22.         if(LOL==0)
  23.             girl1++;
  24.         cout<<"比賽進行中"<<endl;
  25.         cout<<"----------------------------------------------------------------|你終於到了"<<endl;
  26.         for(int i=1; i<=girl1; i++)
  27.             cout<<" ";  
  28.         cout<<"♀瓦搭溪"<<endl;
  29.           LOL=rand()%4;
  30.            if(LOL==1)
  31.          girl2++;     
  32.         for(int i=1; i<=girl2; i++)
  33.             cout<<" ";  
  34.         cout<<"♀洪珝喬"<<endl;
  35.         LOL=rand()%4;
  36.          if(LOL==2)
  37.          girl3++;  
  38.         for(int i=1; i<=girl3; i++)
  39.             cout<<" ";  
  40.         cout<<"♀黃脩涵"<<endl;
  41.         LOL=rand()%4;
  42.          if(LOL==0)
  43.          girl4++;  
  44.         for(int i=1; i<=girl4; i++)
  45.             cout<<" ";  
  46.         cout<<"♀陳采蘊"<<endl;  
  47.         system("cls");  
  48.          
  49.         
  50. }   
  51.          
  52.          
  53.     }
  54.       
  55. }
複製代碼

TOP

返回列表