#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
rel:
int a=0,b=0,c=0,d=0,r=0;
system("cls");
cout<<"人山人海人見人愛 賽馬場"<<endl;
cout<<"---------------------------------------------|終點"<<endl;
cout<<"Q"<<endl;
cout<<"∮"<<endl;
cout<<"㊣"<<endl;
cout<<"♂"<<endl;
system("pause");
system("cls");
while(a!=45&&b!=45&&c!=45&&d!=45)
{
r=rand()%4;
if(r==0)
a++;
if(r==1)
b++;
cout<<"比賽進行中"<<endl;
cout<<"---------------------------------------------| 終點"<<endl;
for(int i=1; i<=a; i++)
cout<<" ";
cout<<"Q"<<endl;
for(int i=1;i<=b;i++)
cout<<" ";
cout<<"∮"<<endl;
system("cls");
}
goto rel;
} |