- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a=0 ,b=0, c=0, d=0,r;
- cout<<"#「輸甲脫褲」超級白目賽馬場#"<<endl;
- cout<<"----------------------------------------------------------------------------|終點|"<<endl;
- cout<<"◢1◤"<<endl;
- cout<<"◢2◤"<<endl;
- cout<<"◢3◤"<<endl;
- cout<<"◢4◤"<<endl;
- system("pause");
- system("cls");
- srand(time(NULL));
- while((a!=70) && (b!=70) && (c!=70) && (d!=70))
- {
- r=rand()%4;
- if(r==0)
- a++;
- else if(r==1)
- b++;
- else if(r==2)
- c++;
- else if(r==3)
- d++;
- cout<<"比賽進行中";
- cout<<endl<<"---------------------------------------------------------------------|終點|"<<endl;
- for(int i=1;i<=a;i++)
- cout<<" ";
- cout<<"◢1◤"<<endl;
- for(int i=1;i<=b;i++)
- cout<<" ";
- cout<<"◢2◤"<<endl;
- for(int i=1;i<=c;i++)
- cout<<" ";
- cout<<"◢3◤"<<endl;
- for(int i=1;i<=d;i++)
- cout<<" ";
- cout<<"◢4◤"<<endl;
- system("cls");
- }
- cout<<"比賽結束";
- cout<<endl<<"---------------------------------------------------------------------|終點|"<<endl;
- for(int i=1;i<=a;i++)
- cout<<" ";
- cout<<"◢1◤"<<endl;
- for(int i=1;i<=b;i++)
- cout<<" ";
- cout<<"◢2◤"<<endl;
- for(int i=1;i<=c;i++)
- cout<<" ";
- cout<<"◢3◤"<<endl;
- for(int i=1;i<=d;i++)
- cout<<" ";
- cout<<"◢4◤"<<endl;
-
-
-
-
- system("pause");
- return 0;
- }
複製代碼 |