还是一样有彩蛋,懂代码的自己研究。
还是告诉你们吧!
一:
输入20140801即可触发这个彩蛋:
二:
输入34494即可触发无限弹窗(我就不演示了^_^)
三:
输入344944即可触发这个彩蛋:
好了,以下是源代码:
#include <iostream>
#include <ostream>
#include <istream>
#include <set>
#include <windows.h>
#include <time.h>
#include <cstdlib>
#include <random>
#include <ctime>
#include <stdio.h>
const int N = 20140801;
const int U = 34494;
const long long S = 344944;
#define wufawanhuidejuxingerror system
using namespace std;//命名空间
int qiaozhuozitwo() //定义函数qiaozhuozi
{
wufawanhuidejuxingerror("color 0c");//将文字颜色换成红色
int c;//定义变量c
printf("你想玩几次?请输入一个数:\n");//输出 "你想玩几次?请输入一个数:"并换行
cin>> c;//输入c
for(int d=0;d<c;d++)//for循环,定义d,d<输入的c,d自增
{//无
unsigned long long a=0;//定义变量a,赋值为0
unsigned long long b=0;//定义变量b,赋值为0
cout << "你想从几开始循环?请输入一个数:\n";//输出"你想从几开始循环?请输入一个数:"并换行
cin >> a;//输入a
cout << "你想从哪里结束循环?请输入一个数:\n";
cin >> b;
for(;a<=b;a++)
{
if(a%7==0||a/7==7||a/7==0||a/10==7||a%10==7||a%7==7)
{
cout << a << "敲桌子!!!" << endl;
}
else if(a==N)
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
}
else
{
cout << a << endl;
}
}
}
wufawanhuidejuxingerror("color F");
return 34-34;
}
int cppguanyushizhegeisrandcaishuyouxidefeichangfuzabiantaidechengxudequanbudaimaya()
{
wufawanhuidejuxingerror("color 0c");
srand((unsigned)time(0));
int t;
cout << "选择数值范围:" << endl;
cin >> t;
if(t==N)
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
}
long double a=rand()%t;
printf("猜数游戏开始!!!请输入一个数(0~%d之间):\n",t);
string c="小了!!!";
string d="大了!!!";
string e="恭喜你,猜对了!!!";
for(int i=0;i<=2147483647;i++)
{
int b[i];
cin >> b[i];
if(b[i]>t)
{
cout << "error!" << endl;
}
if(b[i]<a)
{
cout << c << endl;
}
if(b[i]>a)
{
cout << d << endl;
}
if(b[i]==a)
{
cout << e << endl;
wufawanhuidejuxingerror("color F");
printf("共用%d次呦!!!\n",i);
return 5-5;
}
if(b[i]==N)
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
}
system("pause");
}
return 0+0;
}
int jisuanqi()
{
wufawanhuidejuxingerror("calc");
system("pause");
return 0;
}
int cmdminglingtishifu()
{
wufawanhuidejuxingerror("start cmd");
system("pause");
return 0;
}
int shitoujiandaobu()
{
wufawanhuidejuxingerror("color 0c");
int n;
int m;
cout << "石头剪刀布游戏现在开始!" << endl;
cout << "规则:" << endl;
cout << "n先输,输完后用手捂住,然后m再输,输完后用手捂住,最后一起松开。" << endl;
int c;
cout << "你想玩几次?:" << endl;
cin >> c;
for(int d=0;d<c;d++)
{
cout << "1石头2剪刀3布" << endl;
cin >> n;
cin >> m;
if(n!=1&&n!=2&&n!=3&&n!=20140801&&m!=20140801&&m!=1&&m!=2&&m!=3)
{
cout << "error!" << endl;
}
if (n==1&&m==1)
cout << "平局" << endl;
else if (n==2&&m==2)
cout << "平局" << endl;
else if (n==3&&m==3)
cout << "平局" << endl;
else if (n==1&&m==2)
cout << "n赢了" << endl;
else if (n==2&&m==3)
cout << "n赢了" << endl;
else if (n==3&&m==1)
cout << "n赢了" << endl;
else if (n==2&&m==1)
cout << "m赢了" << endl;
else if (n==3&&m==2)
cout << "m赢了" << endl;
else if (n==1&&m==3)
cout << "m赢了" << endl;
else if(n==N||m==N)
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
}
wufawanhuidejuxingerror("pause");
}
wufawanhuidejuxingerror("color F");
cout << "游戏结束" << endl;
return 0+0;
}
int lunpandu()
{
srand((unsigned)time(0));
wufawanhuidejuxingerror("color 0c");
cout << "规则:\n";
cout << "假设有一把手枪,有六个弹孔,里面有一颗子弹。如果没有开枪,则获得1000000元,如果开抢则将元数清零。" << endl;
int a=rand()%6;
int c=0;
int d=0;
int b[c];
cout << "请选择开枪单孔号码:" << endl;
while(a!=0)
{
while(c<6)
{
cin >> b[c];
if(b[c]==a)
{
cout << "你失败了!" << endl;
d=0;
return 0;
}
if(b[c]>a||b[c]<a)
{
cout << "恭喜你奖金加1000000!!!" << endl;
d+=1000000;
}
if(c==5)
{
cout << "恭喜你带回了5000000元!" << "游戏结束\n" << endl;
return 0;
}
else
{
cout << "error!\n";
cin >> b[c];
}
c++;
}
wufawanhuidejuxingerror("pause");
}
return 0;
}
int error()
{
int a=true;
while(a)
{
wufawanhuidejuxingerror("start cmd");
}
system("pause");
return 0;
}
int qiaozhuozione()
{
wufawanhuidejuxingerror("color 0c");//将文字颜色换成红色
int c;//定义变量c
printf("你想玩几次?请输入一个数:\n");//输出 "你想玩几次?请输入一个数:"并换行
cin >> c;//输入c
for(int d=0;d<c;d++)//for循环,定义d,d<输入的c,d自增
{//无
unsigned long long a=0;//定义变量a,赋值为0
unsigned long long b=0;//定义变量b,赋值为0
cout << "你想从几开始循环?请输入一个数:\n";//输出"你想从几开始循环?请输入一个数:"并换行
cin >> a;//输入a
cout << "你想从哪里结束循环?请输入一个数:\n";
cin >> b;
for(;a<=b;a++)
{
if(a%7==0||a/7==7||a/7==0||a/10==7||a%10==7||a%7==7)
{
cout << a << "敲桌子!!!" << endl;
}
else if(a==N)
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
}
else
{
cout << a << endl;
}
system("pause");
}
}
wufawanhuidejuxingerror("color F");
return 34-34;
}
int errortwo()
{
system("color 0c");
error();
while(true)
{
printf("error!!!!!!!!!!!!!!!!");
}
}
int caidan()
{
wufawanhuidejuxingerror("color A");
cout << "哇塞~你竟然输入了作者的生日!!!!!!!" << endl;
int a;
cout << "玩猜数的话写1,玩敲桌子的话写2,玩石头剪刀布的话写3,打开计算器的话写4,玩轮盘赌的话写5,不玩写0:" << endl;
cin >> a;
if(a!=1&&a!=0&&a!=2&&a!=3&&a!=4&&a!=5&&a!=6&&a!=7&&a!=N&&a!=U&&a!=S)
{
wufawanhuidejuxingerror("color 0c");
cout << "error!" << endl;
MB_HELP;
return 6-6;
}
else if(a==1)
{
cppguanyushizhegeisrandcaishuyouxidefeichangfuzabiantaidechengxudequanbudaimaya();
}
else if(a==2)
{
qiaozhuozitwo();
}
else if(a==3)
{
shitoujiandaobu();
}
else if(a==4)
{
jisuanqi();
}
else if(a==5)
{
lunpandu();
}
else if(a==6)
{
cmdminglingtishifu();
}
else if(a==7)
{
qiaozhuozione();
}
else if(a==U)
{
error();
}
else if(a==N)
{
caidan();
}
else if(a==S)
{
errortwo();
}
else if(a==0)
{
wufawanhuidejuxingerror("color 0c");
printf("结束\n");
return 1234-1233;
}
return 9-9;
}
int main()
{
int a;
cout << "玩猜数的话写1,玩敲桌子(一)的话写2,玩石头剪刀布的话写3,打开计算器的话写4,玩轮盘赌的话写5,打开命令提示符的话写6,玩敲桌子(二)的话写7,不玩写0:" << endl;
cin >> a;
if(a!=1&&a!=0&&a!=2&&a!=3&&a!=4&&a!=5&&a!=6&&a!=7&&a!=N&&a!=U&&a!=S)
{
wufawanhuidejuxingerror("color 0c");
cout << "error!" << endl;
MB_HELP;
return 6-6;
}
else if(a==1)
{
cppguanyushizhegeisrandcaishuyouxidefeichangfuzabiantaidechengxudequanbudaimaya();
}
else if(a==2)
{
qiaozhuozitwo();
}
else if(a==3)
{
shitoujiandaobu();
}
else if(a==4)
{
jisuanqi();
}
else if(a==5)
{
lunpandu();
}
else if(a==6)
{
cmdminglingtishifu();
}
else if(a==7)
{
qiaozhuozione();
}
else if(a==U)
{
error();
}
else if(a==N)
{
caidan();
}
else if(a==S)
{
errortwo();
}
else if(a==0)
{
wufawanhuidejuxingerror("color 0c");
printf("结束\n");
return 1234-1233;
}
system("pause");
return 0;
}