c++游戏(自制)

#include<bits/stdc++.h>
using namespace std;
int n,s=1,x,d1,r=0,a,b,c,yuan;
int main()
{
    cout<<"欢迎来到RYW游戏中心!"<<endl;
    cout<<"1.猜数游戏"<<endl;
    cout<<"2.bug赌场" <<endl;
    cout<<"3.退出/未开发(--------------------------------    Process exited after 3.043 seconds with return value 0请按任意键继续. . .)"<<endl;
    cout<<"请选择一个来玩!(只能玩1个且1次!)"<<endl;
    cin>>n;

     if(n==1)
     {    cout<<"猜数游戏,现在开始!!!(数在1000内)"<<endl;
     while(r=1)
     {
          d1=rand()%1000;
     
         cin>>x;
         if(x>d1)
         {
             cout<<"大了!"<<endl;
             s++;
         }
         else
         {
             if(x<d1)
             {
                 cout<<"小了!"<<endl;
             }
             else
             {
                 if(x==d1)
                 {
                     cout<<"恭喜猜中!!共用"<<s<<"次!";
                     r=1;
                 }
             }
         }
          
     }
    
     }
     else
     { 
         if(n==2)
         {                        int t=rand()%9;
         while(r=1)
         {
             cout<<"请输入1人名字(为数字/英文)"<<endl;
             cin>>a;
             cout<<a<<"有100元。"<<endl;
             cout<<"请问"<<a<<"要做什么?"<<endl;
             cout<<"1.用bug"<<endl;
              cout<<"2.赌钱"<<endl;
              cout<<"预言自己(今日运气)"; 
            cout<<"1/2"<<endl;
              cin>>x;
              if(x==1)
            {
    cout<<"你好,首富,你还有30秒死亡!!!29,28,27,26,25,24,23,22,21....3,2,1"<<endl;
                cout<<"你已死亡,剩余0元!"<<endl<<"--------------------------------"<<endl;
            cout<<"    Process exited after 3.043 seconds with return value 0请按任意键继续. . .";
            return 0;
            }
            else
            {
                if(x==2)
                {
                    while(c=1||yuan==0)
                    {
                        yuan=100;
                        cout<<"请输入3个数。";
                        cout<<endl;
                        cin>>a>>b>>c;
                        int t=rand()%9;
                        if(a==t)
                        {
                            s=s+1;
                        }
                            if(b==t)
                        {
                            s=s+1;
                        }
                    
                            if(c==t)
                        {
                            s=s+1;
                        }
                        if(s==1)
                        {
                            cout<<"恭喜获得3等奖!!!"<<endl;
                                cout<<"你有"<<yuan<<"元"<<endl;
                            yuan=yuan+15;
                        }
                        else
                        {
                            if(s==3)
                            {
                                    cout<<"恭喜获得1等奖!!!"<<endl;
                                        cout<<"你有"<<yuan<<"元"<<endl;
                                    yuan=yuan+60;
                            }
                            else
                            {
                                if(s==2)
                                {
                                    cout<<"恭喜获得2等奖!!!"<<endl;
                                    cout<<"你有"<<yuan<<"元"<<endl;
                                    yuan=yuan+30;
                                }
                            }
                        }
                        break;
                     } 
                }
                else
                {
                    if(x==3)
                    {
                        cout<<"请问你要预言什么?"<<endl;
                        cout<<"1.预言运气"<<endl;
                        cout<<"2.预言SB朋友"<<endl<<"1/2"<<endl;
                        cin>>n;
                        if(n==1)
                        {
                            n=rand()%100;
                            cout<<n<<"为你的今日运气值(100制)"<<endl;
                        }
                        else
                        {if(n==2)
                        {
                                n=rand()%100;
                            cout<<n<<"为SB朋友的今日运气值(100制)"<<endl;
                         } 
                            
                        }
                    }
                }
            }
             
         }
         }
         else
     {
             if(x==3)
        {
        cout<<"--------------------------------"<<endl;
        cout<<"    Process exited after 3.043 seconds with return value 0请按任意键继续. . .";
        cout<<"△▽○◇□☆???▲▼●◆■★♀♂?√×?▃▂▁▄▆▆▇█∷※▓▏▎▍▌▋▊▉§◎¤??‖?卍卐〓℡?@㈱№↖↑↗←㊣→↙↓↘◤◥◣◢?¬▔??**"; 
        }
     }
        
        
    
        
     }
     
return 0;
}

//可以说出下一个游戏是什么。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值