admin管理员组

文章数量:1530842

一个多重小游戏戏,可能有bug(新版编译器不支持put)发现后我会该一改>_<

代码:

  void panduan2()
 
{
if(win>=10)
{
out("已解锁全部游戏");
Sleep(2000);
abc=1;
win-=10;
}else{
out("权限不够");
Sleep(1000);
}
}
void waigua(){
printf("密码1:");
scanf("%d",&a);
printf("密码2:");
scanf("%d",&b);
c=a+b;
if(c==286){
score+=200;
printf("谁是学神?");
cout<<endl;
printf("1 .徐若宸");
cout<<endl;
printf("2 .文雅洁");
cout<<endl;
printf("3 .朱持正");
cout<<endl;
printf("4 .杨程程");
cout<<endl;
printf("5 .张紫涵");
cout<<endl;
printf("6 .石欣宇");
cout<<endl;
printf("7 .其他人");
cout<<endl;
printf("9 .你自己");
cout<<endl;
printf("10.这一题不适合我,退出");
cout<<endl;
scanf("%d",&d);
if(d==1||d==2||d==3){
out("你答对了,真棒");
Sleep(2000);
score+=500;
return;
}
if(d==4||d==5||d==6||d==7||d==8){
out("错了,减100毛爷爷");
Sleep(2000);
score-=100;
return;
}
if(d==9){
out("怎么可能?减200毛爷爷");
Sleep(2000);
score-=200;
return;
}
if(d==10){
out("拜拜,给你1个毛爷爷");
Sleep(2000);
score+=1;
return;
}
if(d>10){
out("调皮蛋,罚50毛爷爷");
Sleep(2000);
score-=50;
return;
}
}
else{
cout<<"你答错了!Sorry!O(∩_∩)O"<<endl;
Sleep(1000);
score=0;
return;
}
}
void chengfa()
{
int cv;
if(score<=0)
{
printf("惩罚开始");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSS5SSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS");
cout<<endl;
printf("刚刚多余的数字在第几行第几列");
scanf("%d",&cv);
int cvv;
cin >> cvv;
if(cv==6&&cvv==19)
{//6 19
score+=50;
lose=10000000;
screen();
}
else
{
chengfa();
system("cls");
}
}
}
void color()
{
out("你要什么字体颜色?");
cout<<endl;
out("黑色:按1");
cout<<endl;
out("蓝色:按2");
cout<<endl;
out("绿色:按3");
cout<<endl;
out("浅绿色:按4");
cout<<endl;
out("红色:按5");
cout<<endl;
out("紫色:按6");
cout<<endl;
out("黄色:按7");
cout<<endl;
out("白色:按8");
cout<<endl;
out("灰色:按9");
cout<<endl;
out("淡蓝色:按A");
cout<<endl;
out("淡绿色:按B");
cout<<endl;
out("淡浅绿色:按C");
cout<<endl;
out("淡红色:按D");
cout<<endl;
out("淡紫色:按E");
cout<<endl;
out("淡黄色:按F");
cout<<endl;
out("亮白色:按G");
cout<<endl;
char c;
cin>>c;
switch(c)
{
case '1':
system("color 0");
break;
case '2':
system("color 1");
break;
case '3':
system("color 2");
break;
case '4':
system("color 3");
break;
case '5':
system("color 4");
break;
case '6':
system("color 5");
break;
case '7':
system("color 6");
break;
case '8':
system("color 7");
break;
case '9':
system("color 8");
break;
case 'A':
system("color 9");
break;
case 'B':
system("color A");
break;
case 'C':
system("color B");
break;
case 'D':
system("color C");
break;
case 'E':
system("color D");
break;
case 'F':
system("color E");
break;
case 'G':
system("color F");
break;
default:
system("color");
break;
}
out("调颜色成功。");

void judge()
{
if(player[cishu]==1)
{
if(computer==2)
{
computer_lose();
}
if(computer==3)
{
player_lose();
}
if(computer==1)
{
tin();
}
}
if(player[cishu]==2)
{
if(computer==3)
{
computer_lose();
}
if(computer==1)
{
player_lose();
}
if(computer==2)
{
tin();
}
}
if(player[cishu]==3)
{
if(computer==1)
{
computer_lose();
}
if(computer==2)
{
player_lose();
}
if(computer==3)
{
tin();
}
}
}
void zhiliwenda()
{
system("cls");
system("color 9F");
cout<<"开始智力问答!"<<endl;
Sleep(1000);
for(int i=1;i<=10;i++)
timu(rand()%10);
tili+=5;
}
void timu(int in)
{
int input;
switch(in)
{
case 0:
{
out("0~31有几个数?");
cout<<endl;
cin>>input;
if(input==32)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("脑子有问题。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 1:
{
out("0,1,1,2,3,5,8,后面是什么?");
cout<<endl;
cin>>input;
if(input==13)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("sb。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 2:
{
out("9,61,52,63,94,后面是什么?");
cout<<endl;
cin>>input;
if(input==64)
{
out("被你给答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("6666666。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 3:
{
out("求7分之1的小数点后第1000位是多少。");
cout<<endl;
cin>>input;
if(input==8)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 4:
{
out("求13分之1的小数点后第1000位是多少。");
cout<<endl;
cin>>input;
if(input==9)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 5:
{
out("2^16=?");
cout<<endl;
cin>>input;
if(input==65536)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。。。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 6:
{
out("一吨水多少钱?");
cout<<endl;
cin>>input;
if(input>=3&&input<=8)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。666666666。。。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 7:
{
out("求你一天吃几碗饭。");
cout<<endl;
cin>>input;
if(input<=2)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("吃货!");
cout<<endl;
timu(rand()%10);
}
}
break;
case 8:
{
out("求标准钢琴有几个键。");
cout<<endl;
cin>>input;
if(input==88)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。。。估计不弹钢琴。。。");
cout<<endl;
timu(rand()%10);
}
}
break;
case 9:
{
out("本游戏至少有多少行?");
cout<<endl;
cin>>input;
if(input>=600)
{
out("被你答对了,真是不可思议!");
cout<<endl;
return;
}
else
{
out("这都不会。");
cout<<endl;
timu(rand()%10);
}
}
break;
}
}
void screan()
{
while(1)
{
system("cls");
if(tili<=0)
{
out("体力为0,休息一会,马上回来!");
cout<<endl;
Sleep(2000);
int i,yushu;
for(i=1;i<=rand()%20;i++)
{
yushu=i%8;
switch(yushu)
{
case 0:
{
system("color 0F");
out("吃鸡三级头套装,限购10个哟!");
Sleep(2000);
system("cls");
break;
}
case 1:
{
system("color 3F");
out("我的世界头套100个,现在大促销,快来买哟!");
Sleep(2000);
system("cls");
break;
}
case 2:
{
system("color AF");
out("装逼专用机器,还送10年保修哟!");
Sleep(2000);
system("cls");
break;
}
case 3:
{
system("color BF");
out("吃鸡专用98k,800里外一枪爆头!");
Sleep(2000);
system("cls");
break;
}
case 4:
{
system("color AB");
out("王者10000000份外挂大放送,手快有手慢无!");
Sleep(2000);
system("cls");
break;
}
case 5:
{
system("color 0F");
out("Surface Pro 7笔记本电脑出售,抢购只在1秒间!");
Sleep(2000);
system("cls");
break;
}
case 6:
{
system("color 1F");
out("6666666,6666666,6666666,6666666");
Sleep(2000);
system("cls");
break;
}
}
}
zhiliwenda();
}
out("你现在有");
cout<<score;
out("张毛爷爷,");
cout<<meichao;
out("美元,");
cout<<tili;
out("点体力值,");
cout<<win;
out("次胜利,");
cout<<lose;
out("次失败,");
cout<<isvip;
out("张VIP卡,");
cout<<ismvp;
out("张MVP卡,");
cout<<xingyv;
out("信誉积分.");
cout<<endl;
out("现在,你可以有以下选择:");
cout<<endl;
out("1:人机大战");
cout<<endl;
out("2:购买道具");
cout<<endl;
out("3.游戏简介");
cout<<endl;
out("4.作者简介");
cout<<endl;
out("5:外挂");
cout<<endl;
out("6:调整设置");
cout<<endl;
out("7:玩玩小游戏");
cout<<endl;
out("8:新年快乐!"); 
int in;
cout<<endl;
cin>>in;
switch(in)
{
case 1:
fight();
screan();
system("cls");
break;
case 2:
store();
system("cls");
break;
case 3:
jianjei();
system("cls");
break;
case 4:
zuozhe();
system("cls");
break;
case 5:
waigua();
system("cls");
break;
case 6:
color();
system("cls");
case 7:
panduan();
system("cls");
break;
case 8:
newyear();
system("cls");
break;
default:
out("输错了,请重试。");
Sleep(1000);
}
}
}

本文标签: 父老乡亲小游戏一个星期做完眼吧