ok- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- first:
- int money,join,gambling,a=0;
- cout<<"Do you want to join the casino?(1)Yes (2)No";
- cin>>join;
- if(join==1)
- goto re;
-
- else
- {
- cout<<"There has no chose of"<<"''"<<join<<"''.";
- goto first;
- }
- re:
- system("cls");
- int x=0,b=0,g=0,u=0,l=0,p=0,r;
- cout<<"How much money would you pay?";
- cin>>money;
- if(money<0)
- {
- cout<<"You did not pay the correct number.";
- goto re;
- }
- srand(time(NULL));
- a++;
- cout<<"「Greece letter Casino」Race court No."<<a<<"roll"<<endl;
- cout<<"---------------------------------------------------------|FIN"<<endl;
- cout<<"χ"<<endl;
- cout<<"β"<<endl;
- cout<<"γ"<<endl;
- cout<<"μ"<<endl;
- cout<<"λ"<<endl;
- cout<<"π"<<endl;
- choose:
- cout<<endl<<"Who would you gambling?(1)χ (2)β (3)γ (4)μ (5)λ (6)π";
- cin>>gambling;
- if(gambling<1 or gambling>6)
- {
- cout<<"There is no chose of"<<"''"<<gambling<<"''.";
- goto choose;
- }
- else
- goto down;
- down:
- system("pause");
- if(gambling==1)
- gambling==x;
- else if(gambling==2)
- gambling==b;
- else if(gambling==3)
- gambling==g;
- else if(gambling==4)
- gambling==u;
- else if(gambling==5)
- gambling==l;
- else
- gambling==p;
-
- while(x<=55 and b<=55 and g<=55 and u<=55 and l<=55 and p<=55)
- {
- r=rand()%6+1;
- if(r==1)
- x++;
- else if(r==2)
- b++;
- else if(r==3)
- g++;
- else if(r==4)
- u++;
- else if(r==5)
- l++;
- else
- p++;
- cout<<"「Greece letter Casino」Race court No."<<a<<"roll GAME ON"<<endl;
- cout<<"---------------------------------------------------------|FIN"<<endl;
- for(int i=0 ;i<=x ;i++)
- cout<<" ";
- cout<<"χ"<<endl;
- for(int i=0 ;i<=b ;i++)
- cout<<" ";
- cout<<"β"<<endl;
- for(int i=0 ;i<=g; i++)
- cout<<" ";
- cout<<"γ"<<endl;
- for(int i=0 ;i<=u; i++)
- cout<<" ";
- cout<<"μ"<<endl;
- for(int i=0; i<=l ;i++)
- cout<<" ";
- cout<<"λ"<<endl;
- for(int i=0; i<=p ;i++)
- cout<<" ";
- cout<<"π"<<endl;
- system("cls");
-
- }
- cout<<"「Greece letter Casino」Race court No."<<a<<"roll GAME OVER, ";
- if(x==56)
- cout<<"χ";
- else if(b==56)
- cout<<"β";
- else if(g==56)
- cout<<"γ";
- else if(u==56)
- cout<<"μ";
- else if(l==56)
- cout<<"λ";
- else
- cout<<"π";
- cout<<"win!"<<endl;
- cout<<"---------------------------------------------------------|FIN"<<endl;
- for(int i=0 ;i<=x ;i++)
- cout<<" ";
- cout<<"χ"<<endl;
- for(int i=0 ;i<=b ;i++)
- cout<<" ";
- cout<<"β"<<endl;
- for(int i=0 ;i<=g; i++)
- cout<<" ";
- cout<<"γ"<<endl;
- for(int i=0 ;i<=u; i++)
- cout<<" ";
- cout<<"μ"<<endl;
- for(int i=0; i<=l ;i++)
- cout<<" ";
- cout<<"λ"<<endl;
- for(int i=0; i<=p ;i++)
- cout<<" ";
- cout<<"π"<<endl;
- system("pause");
- goto re;
-
- system("pause");
- return 0;
- }
複製代碼 |