#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
long long jiankang=100,xuefen=100,guanzhi=1,guanzhidian=0;
string guanzhibiao1[10];
string duihuanma="我",duihuanma2;
int shuru,o,u,suiji;
double banben=1.36; 
void out(){
	cout<<endl<<endl;
	Sleep(1000);
}
void outshort(){
	cout<<endl<<endl;
	Sleep(20);
}
void jiazai(){
	for(int i=1;i<=100;i++){
		if(i==99){
			cout<<"正在加载中......已加载99%";
			cout<<endl<<endl;
			Sleep(2000);
			system("cls");
		}else{
			cout<<"正在加载中......已加载"<<i<<"%";
			outshort();
			system("cls");
		}
	}
}
int main(){
	srand(time(0));
	guanzhibiao1[1]="三坏学生";
	duihuanma+="爱"; 
	guanzhibiao1[2]="普通学生";
	duihuanma+="玩"; 
	guanzhibiao1[3]="三好学生"; 
	duihuanma+="学"; 
	guanzhibiao1[4]="小组长";
	duihuanma+="生"; 
	guanzhibiao1[5]="大组长";
	duihuanma+="模"; 
	guanzhibiao1[6]="课代表";
	duihuanma+="拟"; 
	guanzhibiao1[7]="班级委员";
	guanzhibiao1[8]="班长";
	guanzhibiao1[9]="全校之星";
	cout<<"      学生模拟器";
	outshort();
	cout<<"      学生模拟器";
	outshort();
	cout<<"      学生模拟器";
	out();
	cout<<"    小黄工作室出品";
	out();
	cout<<"      创作者:小黄"; 
	out();
	system("cls");
	jiazai();
    cout<<"-----------------------欢迎来到学生模拟器"<<banben<<"版-----------------------";
	out();
	while((shuru!=5)||(jiankang>0)){
		cout<<"选择要干的事情:";
		out();
		cout<<"1.正常上学 2.逃课 3.写作业 4.干饭 5.查看状态 6.睡大觉 7.结束游戏 8.广告 9.关于游戏 10.兑换码";
		out(); 
		cin>>shuru;
		out();
		if(shuru==1){
			cout<<"你选择正常上学";
			out();
			cout<<"你度过了学习的一天";
			out();
			o=rand()%5;
			u=rand()%5;
			cout<<"健康-"<<o<<",官职点+"<<u;
			out();
			jiankang-=o;
			guanzhidian+=u;
		}
		if(shuru==2){
			cout<<"你选择逃课";
			out();
			suiji=rand()%2;
			if(suiji==0){
				cout<<"你很幸运,没被老师抓住,在外面疯了一天";
				out();
				o=rand()%3;
				cout<<"健康+"<<o;
				out();
			}else{
				cout<<"你被老师抓住了,被打了一顿";
				o=rand()%3;
				out();
				cout<<"健康-"<<o<<",学分-5,官职点-3";
				out();
				jiankang+=o;
				xuefen-=5;
				guanzhidian-=3; 
			}
		}
		if(shuru==3){
			cout<<"你选择写作业";
			out();
			u=rand()%3;
			if(u==0){
				cout<<"你的作业是A等级";
				out();
				o=rand()%2;
				cout<<"健康-"<<o<<",官职点+4";
				out();
				jiankang-=o;
				guanzhidian+=4; 
			}
			if(u==1){
				cout<<"你的作业是B等级";
				out();
				o=rand()%3;
				cout<<"健康-"<<o<<",官职点+2";
				out();
				jiankang-=o;
				guanzhidian+=2; 
			}
			if(u==2){
				cout<<"你的作业是C等级";
				out();
				o=rand()%4;
				cout<<"健康-"<<o<<",官职点+0";
				out();
				jiankang-=o;
				guanzhidian+=0; 
			}
		}
		if(shuru==4){
			cout<<"你跑去干饭了";
			out();
			cout<<"老师看你一天到晚只会吃吃喝喝,扣了你的学分";
			out();
			cout<<"健康+3,学分-2";
			out();
			jiankang+=3;
			xuefen-=2; 
		}
		if(shuru==5){
			cout<<"健康(到0时死亡):"<<jiankang;
			outshort();
			cout<<"学分(到0时被开除):"<<xuefen;
			outshort();
			cout<<"官职:"<<guanzhibiao1[guanzhi];
			outshort();
		}
		if(shuru==6){
			cout<<"你选择睡大觉";
			out();
			o=rand()%2;
			if(o==0){
				cout<<"你美美的睡了一觉";
				out();
				cout<<"健康+1";
				jiankang+=1; 
			}else{
				cout<<"你被老师发现了";
				out();
				cout<<"学分-1";
				xuefen-=1; 
			}
		}
		if(shuru==8){
			for(int i=30;i>=1;i--){
				cout<<"还剩"<<i<<"秒,此游戏详情可搜索https://www.bcoi.cn/blog/507/68ea6edf5f8c16fdf9755c37#1760194271448";
				out(); 
			}
			cout<<"广告结束,健康+2,学分+2,官职点+2";
			out();
			jiankang+=2;
			xuefen+=2;
			guanzhidian+=2; 
		}
		if(shuru==9){
			cout<<"此游戏为弱势学生发声,在此你可以体验一个穷苦学生";
			cout<<"的感受,希望你在这里可以逆转人生,成为全校的神明";
			out();
			cout<<"官职表(越下面官职越大):三坏学生";
			outshort();
			cout<<"                       普通学生";
			outshort();
			cout<<"                       三好学生";
			outshort();
			cout<<"                       小 组 长";
			outshort();
			cout<<"                       大 组 长";
			outshort();
			cout<<"                       课 代 表";
			outshort();
			cout<<"                       班级委员";
			outshort();
			cout<<"                       班    长";
			outshort();
			cout<<"                       全校之星";
			out(); 
			cout<<"游戏创造者:小黄(黄延希)";
			out();
			cout<<"详情搜索:https://www.bcoi.cn/blog/507/68ea6edf5f8c16fdf9755c37#1760194271448";
			out();
		}
		if(shuru==10){
			duihuanma+="器"; 
			cout<<"输入兑换码";
			out();
			cin>>duihuanma2;
			out();
			if(duihuanma2==duihuanma){
				cout<<"兑换码正确,健康,学分恢复到100,官职点+100";
				out();
				xuefen=100;
				jiankang=100;
				guanzhidian+=100;
			}
		}
		if(guanzhidian>=5){
			guanzhi=2;
			if(guanzhidian>=10){
				guanzhi=3;
				if(guanzhidian>=20){
					guanzhi=4;
					if(guanzhidian>=30){
						guanzhi=5;
						if(guanzhidian>=40){
							guanzhi=6;
							if(guanzhidian>=60){
								guanzhi=7;
								if(guanzhidian>=80){
									guanzhi=8;
									if(guanzhidian>=100){
										guanzhi=9;
									}
								}
							}
						}
					}
				}
			}
		}
		cout<<"官职已刷新,请查看";
		out();
		system("cls");
	}
	return 0;
}

G币人生

#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#include<iomanip>
#include<windows.h>
#define endl "\n"
#define A 150
using namespace std;
long long int i,j,k,a[15],sj,b[15],d,db=0,xz,bs;
long long int p[15],cp1,cp2,tx,bf1,bf2,day=1,a6,a7;
long long int pp[A],gs=250,sl,su=1,xz1,x1,sg=250;
bool q1,ll=true;
void datdh(int all){
	Sleep(2000);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"  o                 "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"    o               "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"     o              "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"      o             "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"       o            "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"        o           "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"         o          "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"          o         "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"           o        "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	Sleep(400);
	system("cls");
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"                    "<<endl;
	cout<<"  o                 "<<endl;
	Sleep(1000);
	system("cls");
	cout<<"第";
	Sleep(1000);
	system("cls");
	cout<<"第"<<all;
	Sleep(1000);
	system("cls");
	cout<<"第"<<all<<"天";
	Sleep(1000);
	system("cls");
}
struct wp{
	string wn;
	int jg;
};
struct bb{
	string nz;
	int sl;
};
wp a1[A];
bb a2[A];
wp a3[A];
wp a4[A];
void hs();
string gs1(string x,int z){
	int a=x.size()-2;
	for(i=0;i<=a;++i){
		Sleep(z);
		cout<<x[i];
	}
	string y;
	y+=x[a+1];
	return y;
}
void cj(){
	cout<<"出G"<<endl;
	cin>>xz;
	if(db<xz){
		gs1("sbsbsbsbsbsbsbsbsbsbsbsbsbsbsb......",200);return;
	}
	db-=xz;
	Sleep(1000);
	system("cls");
	cout<<gs1("规则:抽奖(1%*100 2%*50 5%*10 10%*5 50%*1 32%*0.1",150);
	Sleep(100);
	system("cls");
	srand(time(0));
	int x=rand()%200+1;
	if(x==200){
	cout<<"G币加"<<xz*100;db+=(xz*100);	
	}
	else if(x>=198){
	cout<<"G币加"<<xz*50;db+=(xz*50);
	}
	else if(x>=193){
		cout<<"G币加"<<xz*10;db+=(xz*10);
	}
	else if(x>=183){
		cout<<"G币加"<<xz*5;db+=(xz*5);
	}
	else if(x>=133){
		cout<<"G币加"<<xz;db+=(xz);
	}
	else{
		cout<<"G币加"<<x/10;db+=(xz/10);
	}
	Sleep(1500);
	system("cls");
}
void cs(){
	a1[1]={"铅笔",3};
	a1[2]={"橡皮",2};
	a1[3]={"草",10};
	a1[4]={"土",5};
	a1[5]={"木头",4};
	a1[6]={"铁锭",30};
	a1[7]={"铁钉",2};
	a1[8]={"铜线",10};
	a1[9]={"铜锭",20};
    a1[10]={"铝片",10};
    a1[11]={"铝块",100};
    a1[12]={"钻石",500};
    a1[13]={"黄金锭",2000};
    a1[14]={"黄金块",20000};
    a1[15]={"钛合金锭",5000};
    a1[16]={"钛合金块",50000};
    a1[17]={"面包",5};
    a1[18]={"大米",25};
    a1[19]={"一把塑料袋",5};
    a1[20]={"杯子",5};
	a1[21]={"金坷垃",100};
    a1[22]={"可乐",5};
    a1[23]={"纸",10};
    a1[24]={"作业",10};
    a1[25]={"D老师的糖果",100000};
    a1[26]={"炸药",100};
    a1[27]={"邓鱼",20};
    a1[28]={"鱼项航(只是鱼名)",10};
    a1[29]={"橘子",5};
    a1[30]={"香蕉",5};
}
void bg(){
	Sleep(1000);
	system("cls");
	while(1){
	cout<<"格子:"<<gs<<"/"<<sg<<endl; 
	for(i=1;i<=su;++i){
		if(a2[i].sl<=0){
		}else{
			cout<<a2[i].nz<<" 数量:"<<a2[i].sl<<endl;
		}
	}
	cout<<"扣1,买格"<<endl;
	cout<<"扣2,退出"<<endl;
	cin>>xz;
	if(xz==1){
		cout<<"输入你想买的格数(10G/格)"<<endl; 
		cin>>sl;
		Sleep(1000);
	    system("cls");
		if(db<(sl*10)){
			for(i=1;i<=10000;++i){
				Sleep(1);
				cout<<"撒B!没钱别买!"<<endl;
			}
			
			
			return ;
		}else{
			cout<<"机付包减"<<(sl*10)<<"G";
			db-=(sl*10);
			Sleep(1000);
	        system("cls");
			cout<<"格子加  "<<sl;
			sg+=sl;
			gs+=sl;
			Sleep(1000);
		} 
	}
	if(xz==2){
		Sleep(1000);
	    system("cls");
	    break;
	}
	system("cls");	
	}
	 
}
void sxmm(){
	int sb;
	for(i=1;i<=10;++i)pp[i]=0;
	srand(time(0));
	for(i=1;i<=10;++i){
		q1=true;
		sb=rand()%30+1;
		for(j=1;j<=i;j++){
			if(sb==pp[j]){
				i--;q1=false;break;
			}
		}
		pp[i]=sb;
		if(q1==false){
			continue;i--;
		}
	a4[i]=a3[i]=a1[sb];
	}
	srand(time(0));
	for(i=1;i<=10;i++){
		sb=rand()%2+1;
		if(sb==1){
			sb=rand()%a3[i].jg;
			a3[i].jg+=sb;
		}
		if(sb==2){
			sb=rand()%a3[i].jg;
			a3[i].jg-=sb;
		}
	}
}
void mm(){
	Sleep(1000);
	system("cls");
	while(1){
		cout<<"每天都会刷新"<<endl;
		cout<<"机付包:"<<db<<"G"<<endl;
	for(i=1;i<=10;++i){
		cout<<"扣"<<i<<",购买或出售  "<<a3[i].wn<<" 价格:"<<a3[i].jg<<"G"<<" 市场价:"<<a4[i].jg<<endl;
	}
	cout<<"扣11,打开背包"<<endl;
	cout<<"扣12,退出"<<endl;
	cin>>xz;
	if(xz<=10){
		Sleep(1000);
	    system("cls");
	    cout<<"扣1,购买"<<endl;
		cout<<"扣2,出售"<<endl;
		cin>>xz1;
		if(xz1==1){
			cout<<"输入想买的数量"<<endl;
		    cin>>sl;
		if(db-(sl*a3[xz].jg)<0){
			Sleep(1000);
	        system("cls");
	        cout<<"G不够"<<endl;
	        Sleep(1000);
	        system("cls");
	        cout<<"你被踢出去了"<<endl;
	        return ;
		}else if(gs<sl){
			Sleep(1000);
	        system("cls");
			cout<<"你不能买那么多"<<endl; 
			Sleep(1000);
			continue;
		}
		Sleep(1000);
	    system("cls");
		cout<<"机付包减"<<sl*a3[xz].jg<<"G"<<endl;
		db-=(sl*a3[xz].jg);
		Sleep(1000);
	    system("cls");
	    cout<<"背包加 "<<a3[xz].wn<<"X"<<sl;
	    gs-=sl;
	    for(i=1;i<=su;++i){
	    	if(a2[i].nz==a3[xz].wn){
	    		a2[i].sl+=sl;break;
			}else if(i==su){
				a2[i].nz=a3[xz].wn;
				a2[i].sl=sl;
				su++;
				break;
			}
		}
		} 
		if(xz1==2){
			cout<<"输入你想卖的数量"<<endl;
			cin>>sl;
			for(i=1;i<=su;++i){
				if(a2[i].nz==a3[xz].wn){
					x1=i;break;
				}else if(i==su){
					Sleep(1000);
	                system("cls");
	                cout<<"你没有这个物品"<<endl;
	                Sleep(1000);
	                system("cls");
	                cout<<"你被踢出去了"<<endl;
	                Sleep(1000);
	                system("cls");
	                return ;
				}
			}
			if(a2[x1].sl<sl){
				Sleep(1000);
	            system("cls");
				cout<<"你没有那么多"<<endl;
				Sleep(1000);
	            system("cls");
				continue;
				Sleep(1000);
	            system("cls");
			}
			Sleep(1000);
	    	system("cls");
			cout<<"机付包加"<<sl*a3[xz].jg<<"G"<<endl;
			db+=(sl*a3[xz].jg);
			Sleep(1000);
	   	    system("cls");
	    	cout<<"背包减 "<<a2[x1].nz<<"X"<<sl;
	   	    gs+=sl;
	   	    a2[x1].sl-=sl;
		}
		Sleep(1000);
	    system("cls"); 
	}
	if(xz==11){
		bg();
	}
	if(xz==12){
		break;
	}
	system("cls");	
	}	
}
void kt(){
for(i=5;i>=1;--i){cout<<"  G币人生"<<endl;cout<<setw(5)<<i<<"S";Sleep(1000);system("cls");}system("cls");a6=7432;a7=30;
cout<<"欢迎来到G币人生"<<endl;
Sleep(2000);
cout<<"这里你需要通过不同的方法赚G币"<<endl;
Sleep(3000);
system("cls"); 
cout<<"开始吧!"<<endl;
Sleep(2000);
system("cls");
cout<<"我将给你200个G币"<<endl;
db=200; 
Sleep(2000);
cout<<"机付包到账200G"<<endl;
Sleep(3000);
system("cls");	
}
void gg(){
	Sleep(1000);
	system("cls");
	Sleep(1000);
	cout<<"广告开始";
	Sleep(1000);
	system("cls"); 
	hs();
	Sleep(2000);
	system("cls");
	cout<<"机付包到账100G";
	db+=100;
	Sleep(1000);
	system("cls"); 
}
void kp(){
	Sleep(1000);
	system("cls");
	cout<<"出G(赢了你将得两倍)"<<endl;
	bf1=0;bf2=0; 
	cin>>bs;
	if(db<bs){
	cout<<"余额不足";
	Sleep(1000);
    system("cls");
    cout<<"你被踢出去了!!!";
	Sleep(1000);
    system("cls"); 
    return;
    }
    db-=bs;
    cout<<"机付包减"<<bs<<"G"<<endl;
    Sleep(1000);
    system("cls");
    cout<<"规则:"<<endl;
	cout<<"你将得到5张牌,你可以出任意一张,只能出有的,4>3>2>1,1可以干掉4"<<endl; 
	system("pause");
    system("cls");
    srand(time(0));
    for(i=1;i<=5;++i){
    	p[i]=rand()%4+1;
	}
	srand(time(0));
	for(i=1;i<=5;++i){
		Sleep(1000);
		system("cls");
		cout<<"对方:你 "<<bf1<<":"<<bf2<<endl; 
		cout<<"第"<<i<<"回合";
		tx=0;
		Sleep(2000);
        system("cls");
        srand(time(0)); 
		cp1=rand()%2+1;
		srand(time(0)); 
		if(cp1==1){
			cp1=rand()%3+1;
		}
		if(cp1==2){
			cp1=rand()%4+1;
		}
		for(j=1;j<=5;++j){
			if(p[j]!=0){
			cout<<p[j]<<" ";	
			}
		}
		cout<<endl;
		while(1){
			if(tx==1){
			cout<<"再次";	
			}
			tx=0;
		cout<<"出牌"<<endl;
		cin>>cp2;
		for(j=1;j<=5;++j){
			if(p[j]==cp2){
				break;
			}else{
				if(j==5){
					cout<<"不能出没有的牌"<<endl;tx=1;
				}
			}
		}
		if(tx==0){
			for(j=1;j<=5;++j){
				if(p[j]==cp2){
					p[j]=0;break;
				}
			}
			break;
		}	
		}
		Sleep(500);
        system("cls");
		cout<<"?对方   你?";
		Sleep(500);
        system("cls");
        cout<<"  对?   ? ";
		Sleep(500);
        system("cls");
        cout<<"  对方"<<cp1<<" "<<cp2<<"你";
		Sleep(500);
        system("cls");
        if(cp1<cp2){
        	if(cp1==1&&cp2==4){
        		cout<<"  对方"<<cp1<<"  "<<"你";tx=1;
			}else{
				cout<<"  对方"<<"  "<<cp2<<"你";tx=0;
			}
		}
		if(cp1>cp2){
        	if(cp1==4&&cp2==1){
        		cout<<"  对方"<<"  "<<cp2<<"你";tx=0;
			}else{
				cout<<"  对方"<<cp1<<"  "<<"你";tx=1;
			}
		}
		if(cp1==cp2){
			cout<<"  对方"<<"   "<<"你";tx=2;
		}
		Sleep(1000);
        system("cls");
		if(tx==1){
			cout<<"这回合你输了";
			bf1++; 
		}
		if(tx==0){
			cout<<"这回合你赢了";
			bf2++; 
		}
		if(tx==2){
			cout<<"这回合平局";
		}
	}
	Sleep(2000);
	system("cls");
	    if(bf1>bf2){
			cout<<"你输了";
			bf1++; 
		}
		if(bf1<bf2){
			cout<<"你赢了"<<endl;
			bf2++; 
			Sleep(1000);
			cout<<"机付包到账"<<bs*2<<"G";
			db+=(bs*2);
			Sleep(1000);
		}
		if(bf1==bf2){
			cout<<"平局"<<endl;
			Sleep(1000);
			cout<<"机付包到账"<<bs<<"G";
			db+=bs;
			Sleep(1000);
		} 
}
void hm(){
	for(i=1;i<=10;++i){
		a[i]=0;
	}
Sleep(1000);
system("cls");
d=0;
srand(time(0));
cout<<"输入你想买的被数,1为1倍,2为2倍"<<endl;
cin>>bs;
if(db<bs){
	cout<<"余额不足";
	Sleep(1000);
    system("cls");
    cout<<"你被踢出去了!!!";
	Sleep(1000);
    system("cls"); 
    return;
}
db-=bs;
cout<<"机付包减"<<bs<<"G"<<endl;
Sleep(1000);
system("cls"); 
cout<<"每对上一个你卖彩票的G乘2(第一次为你卖彩票的G)"<<endl;
cout<<"输入你的号码(6位,0~30)"<<endl;
cin>>b[1]>>b[2]>>b[3]>>b[4]>>b[5]>>b[6];
Sleep(1000);
system("cls");
cout<<"5秒后开奖";
Sleep(1000); 
system("cls");
for(i=4;i>=1;i--){
	cout<<i<<"s";
	Sleep(1000); 
system("cls");
}
for(i=1;i<=6;++i){
	sj=rand()%30;
		for(k=1;k<=30;++k){
			a[i]=k;
			if(k==sj){
				system("cls");break;
			}
			cout<<setw(2)<<setfill('0')<<a[1]<<" "<<setw(2)<<setfill('0')<<a[2]<<" "<<setw(2)<<setfill('0')<<a[3]<<" "<<setw(2)<<setfill('0')<<a[4]<<" "<<setw(2)<<setfill('0')<<a[5]<<" "<<setw(2)<<setfill('0')<<a[6];
			Sleep(100);
			system("cls");
		}
	
}
for(i=1;i<=6;++i)cout<<setw(2)<<setfill('0')<<a[i]<<" ";
for(i=1;i<=6;++i){
	if(a[i]==b[i]){
		if(d==0){
			d+=bs;
		}else{
			d*=2;
		}
	}		
}
cout<<endl;
d*=bs;
for(i=1;i<=6;++i)cout<<setw(2)<<setfill('0')<<b[i]<<" ";
cout<<endl;
cout<<"你得"<<d<<"个G币"<<endl;
db+=d;
system("pause");
system("cls");	
} 
int main(){
kt();
cs();	
sxmm();
system("cls"); 
while(1){
if(ll==false){
	cout<<"开发者模式"<<endl;
	day=1;
}
cout<<"第"<<day<<"天"<<endl;
cout<<"剩余"<<30-day<<"天"<<endl; 
cout<<"机付包:"<<db<<"G"<<endl;
cout<<"扣1,卡牌对战"<<endl;
cout<<"扣2,彩票"<<endl;
cout<<"扣3,广告"<<endl;
cout<<"扣4,买卖"<<endl;
cout<<"扣5,下一天"<<endl;
cout<<"扣6,抽奖"<<endl;
cin>>xz;
if(xz==1){
	kp(); 
}
if(xz==2){
hm();	
}
if(xz==3){
	gg();
}
if(xz==4){
	mm();
}
if(xz==5){
	Sleep(1000);
	system("cls");
	day++;
	sxmm();
	datdh(day);
}
if(xz==6){
	cj();
}
if(xz==a6){
	Sleep(10000);
	system("cls");
	cout<<"开发者模式"<<endl;
    Sleep(2000);
    cout<<"机付包到账100000000G"<<endl;
	db+=100000000;
	Sleep(2000);
	ll=false;
	gs+=1000000;
	sg+=1000000;
}
if(day==20){
	Sleep(1000);
	system ("cls");
	cout<<"游戏结束"<<endl;
	cout<<"你一共赚了"<<db<<"G"<<endl;
	return 0;
}
system("cls");	
}
return 0;
}
void hs(){for(i=1;i<=a7;++i){cout<<31-i<<"s";Sleep(1000);system("cls");}cout<<"0s";}

代码流行雨

#include <stdio.h>
#include <time.h>
#include <Windows.h>
typedef struct {
   int x, y;
   char ch;
} RAINDROP;
const int BUFFER_SIZE = 100;
int WIDTH = 80;
int HEIGHT = 30;
const int RAIN_LENGTH = 18;
RAINDROP raindropLine[BUFFER_SIZE];
HANDLE HOUT = GetStdHandle(STD_OUTPUT_HANDLE);
void gotoxy(int x, int y) {
   COORD pos;
   pos.X = x;
   pos.Y = y;
   SetConsoleCursorPosition(HOUT, pos);
}
void show_cursor(BOOL hide) {
   CONSOLE_CURSOR_INFO cciCursor;
   if (GetConsoleCursorInfo(HOUT, &cciCursor)) {
       cciCursor.bVisible = hide;
       SetConsoleCursorInfo(HOUT, &cciCursor);
   }
}
void set_color(int color) {
   SetConsoleTextAttribute(HOUT, color);
}
int main() {
   CONSOLE_SCREEN_BUFFER_INFO info;
   HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
   HWND consoleWindow = GetConsoleWindow();
   ShowWindow(consoleWindow, SW_MAXIMIZE);
   GetConsoleScreenBufferInfo(hConsole, &info);
   COORD bufferSize;
   bufferSize.X = info.dwMaximumWindowSize.X;
   bufferSize.Y = info.dwMaximumWindowSize.Y;
   SetConsoleScreenBufferSize(hConsole, bufferSize);
   GetConsoleScreenBufferInfo(HOUT, &info);
   HEIGHT = info.srWindow.Bottom;
   WIDTH = info.srWindow.Right;
   show_cursor(FALSE);
   srand((unsigned int)time(NULL));
   for (int i = 0; i < BUFFER_SIZE; i++) {
       raindropLine[i].x = rand() % WIDTH;
       raindropLine[i].y = rand() % HEIGHT;
       raindropLine[i].ch = rand() % 26 + 97;
   }
   while (true) {
       GetConsoleScreenBufferInfo(HOUT, &info);
       HEIGHT = info.srWindow.Bottom;
       WIDTH = info.srWindow.Right;
       for (int i = 0; i < BUFFER_SIZE; ++i) {
           if (raindropLine[i].y <= HEIGHT) {
               gotoxy(raindropLine[i].x, raindropLine[i].y);
               set_color(FOREGROUND_GREEN);
               putchar(raindropLine[i].ch);
           }
           gotoxy(raindropLine[i].x, raindropLine[i].y - RAIN_LENGTH);
           putchar(' ');
           raindropLine[i].y++;
           raindropLine[i].ch = rand() % 26 + 97;
           if (raindropLine[i].y > HEIGHT + RAIN_LENGTH) {
               raindropLine[i].x = rand() % WIDTH;
               raindropLine[i].y = rand() % HEIGHT;
           }
           if (raindropLine[i].y <= HEIGHT) {
               gotoxy(raindropLine[i].x, raindropLine[i].y);
               set_color(FOREGROUND_GREEN | FOREGROUND_INTENSITY);
               putchar(raindropLine[i].ch);
           }
       }
       Sleep(50);
   }
   getchar();
   return 0;
}

生气喵1.31版

#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
bool t=1;
double banben=1.31;
int a,b,c,d,shengqizhi,shuru,l,g,max1=INT_MIN,s,x2;
int x[15];
long long qianbao=50,sr;
void o(){
	cout<<endl<<endl;
	Sleep(750);
}
void out(){
	cout<<endl<<endl;
}
void chupai(){
	srand(time(0));
	cin>>shuru;
	out();
	s=1;
	if(shuru==a){
		cout<<"你打出了"<<a;
		o();
		cout<<"生气值+"<<a;
		o();
		shengqizhi+=a;
		a=rand()%11; 
		s=0;
	}
	if(s==1){
		if(shuru==b){
			cout<<"你打出了"<<b;
			o();
			cout<<"生气值+"<<b;
			o();
			shengqizhi+=b; 
			b=rand()%11;
			s=0; 
		}
	}
	if(s==1){
		if(shuru==c){
			cout<<"你打出了"<<c;
			o();
			cout<<"生气值+"<<c;
			o();
			shengqizhi+=c; 
			c=rand()%11;
			s=0; 
		}	
	}
	if(s==1){
		if(shuru==d){
			cout<<"你打出了"<<d;
			o();
			cout<<"生气值+"<<d;
			o();
			shengqizhi+=d; 
			d=rand()%11;
			s=0; 
		}
	}
	if(s==1){
		if((shuru!=a)&&(shuru!=b)&&(shuru!=c)&&(shuru!=d)){
			cout<<"打出的牌不合法,系统自动视为打出第一张牌";
			o();
			cout<<"你打出了"<<a;
			o();
			cout<<"生气值+"<<a;
			o();
			shengqizhi+=a; 
			a=rand()%11;
			s=0; 
		}
	}
}
void zongchengxu1(){
	srand(time(0));
	shengqizhi=0;
	a=rand()%11;
	b=rand()%11;
	c=rand()%11;
	d=rand()%11;
	x2=rand()%11;
	while(t==1){
    	cout<<"状态:你的回合";
    	out();
    	cout<<"你有的牌:"<<a<<" "<<b<<" "<<c<<" "<<d<<" ";
    	out();
    	cout<<"现在生气值:"<<shengqizhi;
    	out();
    	cout<<"请出牌:";
    	out();
    	chupai();
    	if(shengqizhi>=100){
    		cout<<"生气值达到100";
			o();
    		cout<<"你输了,无奖励";
    		out();
    		break;
    		t=0;
		}
		o();
		o();
		o(); 
		if(t==1){
			cout<<"状态:对手的回合";
    		out();
    		cout<<"现在生气值:"<<shengqizhi;
    		o();
    		x2=rand()%11;
    		cout<<"对手出了"<<x2;
    		out();
    		cout<<"生气值+"<<x2;
			o(); 
			shengqizhi+=x2;
			if(shengqizhi>=100){
				cout<<"生气值达到100";
				o();
	    		cout<<"你赢了,获得30元奖励";
	    		out();
	    		qianbao+=30;
	    		break;
	    		t=0;
			}
			o();
			o();
			o(); 
		}
	}
}
void zongchengxu2(){
	srand(time(0));
	shengqizhi=0;
	a=rand()%11;
	b=rand()%11;
	c=rand()%11;
	d=rand()%11;
	x[1]=rand()%11;
    x[2]=rand()%11;
	while(t==1){
    	cout<<"状态:你的回合";
    	out();
    	cout<<"你有的牌:"<<a<<" "<<b<<" "<<c<<" "<<d<<" ";
    	out();
    	cout<<"现在生气值:"<<shengqizhi;
    	out();
    	cout<<"请出牌:";
    	out();
    	chupai();
    	if(shengqizhi>=100){
    		cout<<"生气值达到100";
			o();
    		cout<<"你输了,无奖励";
    		out(); 
    		break;
    		t=0;
		}
		o();
		o();
		o(); 
		if(t==1){
			cout<<"状态:对手的回合";
    		out();
    		cout<<"现在生气值:"<<shengqizhi;
    		o();
    		for(int i=1;i<=2;i++){
    			if((shengqizhi+x[i]<100)&&(x[i]>max1)){
    				max1=x[i];
    				g=i;
				}
			}
			if(max1==INT_MIN){
				cout<<"对手出了"<<x[2];
    			out();
    			cout<<"生气值+"<<x[2];
				o(); 
				shengqizhi+=x[2];
				max1=INT_MIN;
			}else{
				x[g]=rand()%11;
    			cout<<"对手出了"<<max1;
    			out();
    			cout<<"生气值+"<<max1;
				o(); 
				shengqizhi+=max1;
				max1=INT_MIN;
			}
			if(shengqizhi>=100){
				cout<<"生气值达到100";
				o();
	    		cout<<"你赢了,获得80元奖励";
	    		qianbao+=80;
				out(); 
	    		break;
	    		t=0;
			}
			o();
			o();
			o(); 
		}
	}
}
void zongchengxu3(){
	srand(time(0));
	shengqizhi=0;
	a=rand()%11;
	b=rand()%11;
	c=rand()%11;
	d=rand()%11;
	x[1]=rand()%11;
    x[2]=rand()%11;
    x[3]=rand()%11; 
	while(t==1){
    	cout<<"状态:你的回合";
    	out();
    	cout<<"你有的牌:"<<a<<" "<<b<<" "<<c<<" "<<d<<" ";
    	out();
    	cout<<"现在生气值:"<<shengqizhi;
    	out();
    	cout<<"请出牌:";
    	out();
    	chupai();
    	if(shengqizhi>=100){
    		cout<<"生气值达到100";
			o();
    		cout<<"你输了,无奖励";
    		out(); 
    		break;
    		t=0;
		}
		o();
		o();
		o(); 
		if(t==1){
			cout<<"状态:对手的回合";
    		out();
    		cout<<"现在生气值:"<<shengqizhi;
    		o();
    		for(int i=1;i<=3;i++){
    			if((shengqizhi+x[i]<100)&&(x[i]>max1)){
    				max1=x[i];
    				g=i;
				}
			}
			if(max1==INT_MIN){
				cout<<"对手出了"<<x[2];
    			out();
    			cout<<"生气值+"<<x[2];
				o(); 
				shengqizhi+=x[2];
				max1=INT_MIN;
			}else{
				x[g]=rand()%11;
    			cout<<"对手出了"<<max1;
    			out();
    			cout<<"生气值+"<<max1;
				o(); 
				shengqizhi+=max1;
				max1=INT_MIN;
			}
			if(shengqizhi>=100){
				cout<<"生气值达到100";
				o();
	    		cout<<"你赢了,获得150元奖励";
	    		qianbao+=150;
				out(); 
	    		break;
	    		t=0;
			}
			o();
			o();
			o(); 
		}
	}
}
int main(){ 
	srand(time(0));
	cout<<"-------------------------欢迎来到生气喵大乱斗"<<banben<<"版-------------------------";
    o();
    cout<<"你知道规则吗?";
    out();
    cout<<"1.知道 2.不知道";
    out();
    cin>>l;
    o();
    if(l==1){
    	cout<<"既然你知道规则,那就跳过新手教程";
    	o();
	}
	if(l==2){
		cout<<"这个游戏的规则是:";
		o();
		cout<<"你有四个卡位,你要和对手轮流出出牌,每次出牌都会增加相应的生气值,当生气值达到100时,最近一次出牌的人死亡";
		o();
		cout<<"该游戏原型来源于微信小程序“炸弹喵”里的休闲模式“生气喵”,有兴趣可以去看一下";
		o();
	}
	while(qianbao>0){
		cout<<"选择要干的事情(你现在有"<<qianbao<<"元)";
		out();
		cout<<"全国赛系列: 1.生气喵三人青铜全国赛 2.生气喵三人白银全国赛 3.生气喵三人黄金全国赛";
		out();
		cin>>sr;
		o();
		if(sr==1){//------------------------------------------------------青铜赛 
			cout<<"是否购买“生气喵双人青铜全国赛”入场券(20元一张)";
			o();
			cout<<"1.是 2.否";
			o();
			int shuru5;
			cin>>shuru5;
			o();
			if(qianbao>=20){
				if(shuru5==1){
					cout<<"你参加了“生气喵双人青铜全国赛”";
					qianbao-=20;
					o();
					cout<<"开始游戏";
					o();
					zongchengxu1();
				}else{
					cout<<"你没有参加“生气喵双人青铜全国赛”";
					out();
				}
			}else{
				cout<<"你不够钱";
				o();
			}
		}//---------------------------------------------------------------- 
		if(sr==2){//------------------------------------------------------白银赛 
			cout<<"是否购买“生气喵双人白银全国赛”入场券(50元一张)";
			o();
			cout<<"1.是 2.否";
			o();
			int shuru5;
			cin>>shuru5;
			o();
			if(qianbao>=50){
				if(shuru5==1){
					cout<<"你参加了“生气喵双人白银全国赛”";
					qianbao-=50;
					o();
					cout<<"开始游戏";
					o();
					zongchengxu2();
				}else{
					cout<<"你没有参加“生气喵双人白银全国赛”";
					out();
				}
			}else{
				cout<<"你不够钱";
				o();
			}
		}//---------------------------------------------------------------- 
		if(sr==3){//------------------------------------------------------白银赛 
			cout<<"是否购买“生气喵双人黄金全国赛”入场券(100元一张)";
			o();
			cout<<"1.是 2.否";
			o();
			int shuru5;
			cin>>shuru5;
			o();
			if(qianbao>=100){
				if(shuru5==1){
					cout<<"你参加了“生气喵双人黄金全国赛”";
					qianbao-=100;
					o();
					cout<<"开始游戏";
					o();
					zongchengxu3();
				}else{
					cout<<"你没有参加“生气喵双人黄金全国赛”";
					out();
				}
			}else{
				cout<<"你不够钱";
				o();
			}
		}//---------------------------------------------------------------- 
	} 
	cout<<"你因为没钱死了";
    return 0;
}

数字炸弹新版

#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int main(){
	long long a,b1,p1=0,p2=99,v;
    cout<<"欢迎来到数字炸弹的世界"<<endl<<endl;
	srand(time(0));
	a=rand()%100;
	cout<<"游戏规则,两个玩家轮流选择数字,我会告诉你们距离炸弹是大了还是小了,"<<endl<<endl<<"不断缩小范围。最后谁说出炸弹谁就输了"<<endl<<endl;
	cout<<"收到请回复”yes sir,小黄”!"<<endl<<endl;
	bool t=1;
	string x;
	while(t){
		getline(cin,x);
		if(x=="yes sir,小黄"){
			t=0;
			cout<<"干的不错,小伙子,接下来,游戏开始了"<<endl<<endl; 
		}else{
			t=1;
			cout<<"收到请回复”yes sir,小黄”!"<<endl<<endl;
		}
	}
	t=1;
	int z=1;
	while(t){
		cout<<"范围:"<<p1<<"到"<<p2<<endl<<endl;
		cout<<z<<"号玩家选择数字"<<endl<<endl;
		cin>>b1;
		if(b1>p1&&b1<p2){
			if(b1>a){
				p2=b1;
				cout<<"范围缩小到"<<p1<<"到"<<p2<<endl<<endl;
				if(z==1){
					z=2;
				}else{
					z=1;
				}
			}
			if(b1<a){
				p1=b1;
				cout<<"范围缩小到"<<p1<<"到"<<p2<<endl<<endl;
				if(z==1){
					z=2;
				}else{
					z=1;
				}
			}
			if(b1==a){
				if(z==1){
					v=2;
				}else{
					v=1;
				}
				cout<<z<<"号玩家死了"<<endl<<endl<<v<<"号玩家胜利"<<endl<<endl<<"游戏结束";
				t=0; 
			}
		}else{
			cout<<z<<"号玩家请重新选择合法数字"<<endl<<endl;
		}
		Sleep(2000);
		system("cls"); 
	}
    return 0;
}