- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- while(true)
- {
- int girl1=0, girl2=0, girl3=0, girl4=0, LOL=0;
- system("cls");
- cout<<"賽跑場"<<endl;
- cout<<"----------------------------------------------------------------|你終於到了"<<endl;
- cout<<"♀瓦搭溪"<<endl;
- cout<<"♀洪珝喬"<<endl;
- cout<<"♀黃脩涵"<<endl;
- cout<<"♀陳采蘊"<<endl;
- system("pause");
- system("cls");
-
- while(girl1!=61 && girl2!=61 && girl3!=61 && girl4!=61)
- {
- LOL=rand()%4;
- if(LOL==0)
- girl1++;
- cout<<"比賽進行中"<<endl;
- cout<<"----------------------------------------------------------------|你終於到了"<<endl;
- for(int i=1; i<=girl1; i++)
- cout<<" ";
- cout<<"♀瓦搭溪"<<endl;
- LOL=rand()%4;
- if(LOL==1)
- girl2++;
- for(int i=1; i<=girl2; i++)
- cout<<" ";
- cout<<"♀洪珝喬"<<endl;
- LOL=rand()%4;
- if(LOL==2)
- girl3++;
- for(int i=1; i<=girl3; i++)
- cout<<" ";
- cout<<"♀黃脩涵"<<endl;
- LOL=rand()%4;
- if(LOL==0)
- girl4++;
- for(int i=1; i<=girl4; i++)
- cout<<" ";
- cout<<"♀陳采蘊"<<endl;
- system("cls");
-
-
- }
-
-
- }
-
- }
複製代碼 |