返回列表 發帖
自己做的不完整版
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     first:
  7.     int money,join,gambling;
  8.     cout<<"Do you want to join the casino?(1)Yes (2)No";
  9.     cin>>join;
  10.     if(join==1)
  11.         goto re;
  12.     else if(join==2)
  13.         goto playout;
  14.     else
  15.     {
  16.         cout<<"There has no chose of"<<"''"<<join<<"''.";
  17.         goto first;
  18.     }
  19.     re:
  20.     system("cls");
  21.     int x=0,b=0,g=0,u=0,l=0,p=0,r;
  22.     cout<<"How much money would you pay?";
  23.     cin>>money;
  24.     if(money<0)
  25.     {
  26.         cout<<"You did not pay the correct number.";
  27.         goto re;           
  28.     }
  29.     srand(time(NULL));
  30.     cout<<"「Greece letter Casino」Race court"<<endl;
  31.     cout<<"---------------------------------------------------------|FIN"<<endl;
  32.     cout<<"χ"<<endl;
  33.     cout<<"β"<<endl;
  34.     cout<<"γ"<<endl;
  35.     cout<<"μ"<<endl;
  36.     cout<<"λ"<<endl;
  37.     cout<<"π"<<endl;
  38.     choose:
  39.     cout<<endl<<"Who would you gambling?(1)χ (2)β (3)γ (4)μ (5)λ (6)π";
  40.     cin>>gambling;
  41.     if(gambling<1 or gambling>6)
  42.     {
  43.         cout<<"There is no chose of"<<"''"<<gambling<<"''.";
  44.         goto choose;              
  45.     }
  46.     else
  47.         goto down;
  48.     down:
  49.     system("pause");
  50.     if(gambling==1)
  51.         gambling==x;
  52.     else if(gambling==2)
  53.         gambling==b;
  54.     else if(gambling==3)
  55.         gambling==g;
  56.     else if(gambling==4)
  57.         gambling==u;
  58.     else if(gambling==5)
  59.         gambling==l;
  60.     else
  61.         gambling==p;
  62.    
  63.     while(x<=55 and b<=55 and g<=55 and u<=55 and l<=55 and p<=55)
  64.     {
  65.         r=rand()%6+1;
  66.         if(r==1)
  67.             x++;
  68.         else if(r==2)
  69.             b++;
  70.         else if(r==3)
  71.             g++;
  72.         else if(r==4)
  73.             u++;
  74.         else if(r==5)
  75.             l++;
  76.         else
  77.             p++;      
  78.         cout<<"「Greece letter Casino」Race court GAME ON"<<endl;
  79.         cout<<"---------------------------------------------------------|FIN"<<endl;
  80.         for(int i=0 ;i<=x ;i++)
  81.             cout<<" ";
  82.         cout<<"χ"<<endl;
  83.         for(int i=0 ;i<=b ;i++)
  84.             cout<<" ";
  85.         cout<<"β"<<endl;
  86.         for(int i=0 ;i<=g; i++)
  87.             cout<<" ";
  88.         cout<<"γ"<<endl;
  89.         for(int i=0 ;i<=u; i++)
  90.             cout<<" ";
  91.         cout<<"μ"<<endl;
  92.         for(int i=0; i<=l ;i++)
  93.             cout<<" ";
  94.         cout<<"λ"<<endl;
  95.         for(int i=0; i<=p ;i++)
  96.             cout<<" ";
  97.         cout<<"π"<<endl;
  98.         system("cls");
  99.     }
  100.     cout<<"「Greece letter Casino」Race court GAME OVER"<<endl;
  101.         cout<<"---------------------------------------------------------|FIN"<<endl;
  102.         for(int i=0 ;i<=x ;i++)
  103.             cout<<" ";
  104.         cout<<"χ"<<endl;
  105.         for(int i=0 ;i<=b ;i++)
  106.             cout<<" ";
  107.         cout<<"β"<<endl;
  108.         for(int i=0 ;i<=g; i++)
  109.             cout<<" ";
  110.         cout<<"γ"<<endl;
  111.         for(int i=0 ;i<=u; i++)
  112.             cout<<" ";
  113.         cout<<"μ"<<endl;
  114.         for(int i=0; i<=l ;i++)
  115.             cout<<" ";
  116.         cout<<"λ"<<endl;
  117.         for(int i=0; i<=p ;i++)
  118.             cout<<" ";
  119.         cout<<"π"<<endl;
  120.     system("pause");
  121.     goto re;
  122.     playout:
  123.     system("pause");
  124.     return 0;
  125. }
複製代碼

TOP

ok
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     first:
  7.     int money,join,gambling,a=0;
  8.     cout<<"Do you want to join the casino?(1)Yes (2)No";
  9.     cin>>join;
  10.     if(join==1)
  11.         goto re;
  12.    
  13.     else
  14.     {
  15.         cout<<"There has no chose of"<<"''"<<join<<"''.";
  16.         goto first;
  17.     }
  18.     re:
  19.     system("cls");
  20.     int x=0,b=0,g=0,u=0,l=0,p=0,r;
  21.     cout<<"How much money would you pay?";
  22.     cin>>money;
  23.     if(money<0)
  24.     {
  25.         cout<<"You did not pay the correct number.";
  26.         goto re;           
  27.     }
  28.     srand(time(NULL));
  29.     a++;
  30.     cout<<"「Greece letter Casino」Race court  No."<<a<<"roll"<<endl;
  31.     cout<<"---------------------------------------------------------|FIN"<<endl;
  32.     cout<<"χ"<<endl;
  33.     cout<<"β"<<endl;
  34.     cout<<"γ"<<endl;
  35.     cout<<"μ"<<endl;
  36.     cout<<"λ"<<endl;
  37.     cout<<"π"<<endl;
  38.     choose:
  39.     cout<<endl<<"Who would you gambling?(1)χ (2)β (3)γ (4)μ (5)λ (6)π";
  40.     cin>>gambling;
  41.     if(gambling<1 or gambling>6)
  42.     {
  43.         cout<<"There is no chose of"<<"''"<<gambling<<"''.";
  44.         goto choose;              
  45.     }
  46.     else
  47.         goto down;
  48.     down:
  49.     system("pause");
  50.     if(gambling==1)
  51.         gambling==x;
  52.     else if(gambling==2)
  53.         gambling==b;
  54.     else if(gambling==3)
  55.         gambling==g;
  56.     else if(gambling==4)
  57.         gambling==u;
  58.     else if(gambling==5)
  59.         gambling==l;
  60.     else
  61.         gambling==p;
  62.    
  63.     while(x<=55 and b<=55 and g<=55 and u<=55 and l<=55 and p<=55)
  64.     {
  65.         r=rand()%6+1;
  66.         if(r==1)
  67.             x++;
  68.         else if(r==2)
  69.             b++;
  70.         else if(r==3)
  71.             g++;
  72.         else if(r==4)
  73.             u++;
  74.         else if(r==5)
  75.             l++;
  76.         else
  77.             p++;      
  78.         cout<<"「Greece letter Casino」Race court No."<<a<<"roll  GAME ON"<<endl;
  79.         cout<<"---------------------------------------------------------|FIN"<<endl;
  80.         for(int i=0 ;i<=x ;i++)
  81.             cout<<" ";
  82.         cout<<"χ"<<endl;
  83.         for(int i=0 ;i<=b ;i++)
  84.             cout<<" ";
  85.         cout<<"β"<<endl;
  86.         for(int i=0 ;i<=g; i++)
  87.             cout<<" ";
  88.         cout<<"γ"<<endl;
  89.         for(int i=0 ;i<=u; i++)
  90.             cout<<" ";
  91.         cout<<"μ"<<endl;
  92.         for(int i=0; i<=l ;i++)
  93.             cout<<" ";
  94.         cout<<"λ"<<endl;
  95.         for(int i=0; i<=p ;i++)
  96.             cout<<" ";
  97.         cout<<"π"<<endl;
  98.         system("cls");
  99.         
  100.     }
  101.     cout<<"「Greece letter Casino」Race court No."<<a<<"roll  GAME OVER, ";
  102.         if(x==56)
  103.         cout<<"χ";
  104.         else if(b==56)
  105.         cout<<"β";
  106.         else if(g==56)
  107.         cout<<"γ";
  108.         else if(u==56)
  109.         cout<<"μ";
  110.         else if(l==56)
  111.         cout<<"λ";
  112.         else
  113.         cout<<"π";
  114.     cout<<"win!"<<endl;
  115.         cout<<"---------------------------------------------------------|FIN"<<endl;
  116.         for(int i=0 ;i<=x ;i++)
  117.             cout<<" ";
  118.         cout<<"χ"<<endl;
  119.         for(int i=0 ;i<=b ;i++)
  120.             cout<<" ";
  121.         cout<<"β"<<endl;
  122.         for(int i=0 ;i<=g; i++)
  123.             cout<<" ";
  124.         cout<<"γ"<<endl;
  125.         for(int i=0 ;i<=u; i++)
  126.             cout<<" ";
  127.         cout<<"μ"<<endl;
  128.         for(int i=0; i<=l ;i++)
  129.             cout<<" ";
  130.         cout<<"λ"<<endl;
  131.         for(int i=0; i<=p ;i++)
  132.             cout<<" ";
  133.         cout<<"π"<<endl;
  134.     system("pause");
  135.     goto re;
  136.    
  137.     system("pause");
  138.     return 0;
  139. }
複製代碼

TOP

返回列表