- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- int a;
- int b[4]={0,0,0,0};
- cout<<"好事成雙 賽馬場"<<endl;
- cout<<"--------------------------------------"<<endl;
- cout<<"*"<<endl;
- cout<<"+"<<endl;
- cout<<"0"<<endl;
- cout<<"?"<<endl;
- system("pause");
- while(true)
- {
-
- srand(time(NULL));
- a==rand();
- b[a]++;
- cout<<"好事成雙 進行中"<<endl;
- cout<<"--------------------------------------"<<endl;
-
- for(int i=0;i<=b{0};i++)
- {cout<<" ";
- }
- cout<<"*"<<endl;
- for(int i=0;i<=b{1};i++)
- {cout<<" ";
- }
- cout<<"+"<<endl;
- for(int i=0;i<=b{2};i++)
- {cout<<" ";
- }
- cout<<"0"<<endl;
- for(int i=0;i<=b{3};i++)
- {cout<<" ";
- }
- cout<<"?"<<endl;
-
- }
-
-
-
-
-
- system("pause");
- return 0;
- }
複製代碼 |