跳到正文

学习·文化课

一个好玩的代码(一)

ErinBrockovich约 40 分钟
原文
文章信息与版本

文章信息

发布
2025年5月6日
收录
2026年4月3日
更新
2026年12月1日
篇幅
约 40 分钟
获赞
1

版本

  1. v3当前
  2. v2
  3. v1

可以复制~\

注:用Dev-c++ 运行效果最佳!

C++
#include <bits/stdc++.h>
#include <Windows.h>
using namespace std;
string mima="114514";
int cishu=99999,qp=0;
void open(){
	cout<<"你要开机吗......"<<endl;
	cout<<"开机请输出1......"<<endl;
	char a;
	cin>>a;//密码=114514 
	if(a=='1'){
		for(int i=1;i<=3;i++)
	   	{
	   	   system("Cls");
	   	   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                  ";
	   	   cout<<"加载中";
	   	   Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	   	}
		for(int i=1;i<=100;i+=2)
	   	{
	   	   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                          ";
	   	   printf("%d",i);
	   	   cout<<"%";
	   	   Sleep(50);
	   	   system("Cls");
	   	}
		cout<<"已开机"; 
	}
	else{
		open();
	}
	
}
void guanji(){
	system("Cls");
	for(int i=1;i<=2;i++)
	{
	   	   system("Cls");
	   	   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                  ";
	   	   cout<<"关机中";
	   	   Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	}
	system("Cls");
	open();
}

void zhuomian(){
	system("Cls");
	cout<<"桌面"<<endl;
	cout<<endl;
	cout<<endl;
	cout<<"__________"<<"          "<<"__________"<<"          "<<"__________"<<endl;
	cout<<"|        |"<<"          "<<"|        |"<<"          "<<"|        |"<<endl;
	cout<<"|王者荣耀|"<<"          "<<"|  设置  |"<<"          "<<"|猜数游戏|"<<endl;
	cout<<"|        |"<<"          "<<"|        |"<<"          "<<"|        |"<<endl;
	cout<<"__________"<<"          "<<"__________"<<"          "<<"__________"<<endl;
	cout<<"进入应用请按1"<<"       "<<"进入应用请按3"<<"       "<<"进入应用请按5"<<endl;
	cout<<endl;
	cout<<endl;
	cout<<endl;
	cout<<"__________"<<"          "<<"__________"<<"          "<<"__________"<<endl;
	cout<<"|        |"<<"          "<<"|        |"<<"          "<<"|        |"<<endl;
	cout<<"|计算游戏|"<<"          "<<"| 浏览器 |"<<"          "<<"| 计算器 |"<<endl;
	cout<<"|        |"<<"          "<<"|        |"<<"          "<<"|        |"<<endl;
	cout<<"__________"<<"          "<<"__________"<<"          "<<"__________"<<endl;
	cout<<"进入应用请按2"<<"       "<<"进入应用请按4"<<"       "<<"进入应用请按6"<<endl;
	cout<<endl;
	cout<<endl;
	cout<<endl;
	cout<<"__________"<<endl;
	cout<<"|        |"<<endl;
	cout<<"|你说我猜|"<<endl;
	cout<<"|        |"<<endl;
	cout<<"__________"<<endl;
	cout<<"进入应用请按7"<<endl;
	int bb;
	cin>>bb;
	if(bb==1){
		system("Cls");
		cout<<"______________________________________"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|       欢迎来到王者荣耀小游戏       |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"______________________________________";
	Sleep(2000);
	system("Cls");
	cout<<"______________________________________"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|       欢迎来到王者荣耀小游戏       |"<<endl;
	cout<<"|                请放心游玩,        |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"______________________________________";
	Sleep(2000);
	system("Cls");
	cout<<"______________________________________"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|                                    |"<<endl;
	cout<<"|       欢迎来到王者荣耀小游戏       |"<<endl;
	cout<<"|                请放心游玩,        |"<<endl;
	cout<<"|                 无任何关机指令!   |"<<endl;
	cout<<"______________________________________"<<endl;
	Sleep(1000);
	cout<<"作者:"<<endl;
	Sleep(1000);
	cout<<"蔡徐坤"<<endl;
        Sleep(2000);
	system("Cls");
	Sleep(1000);
	for(int i=1;i<=5;i++)
	   {
	   	   system("Cls");
	   	   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                  ";
	   	   cout<<"加载中";
	   	   Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	   }
	for(int i=1;i<=100;i++)
	   {
	   	   printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                          ";
	   	   printf("%d",i);
	   	   cout<<"%";
	   	   Sleep(50);
	   	   system("Cls");
	   }
	Sleep(1000);
	cout<<"你特么还真信!"<<endl;
	cout<<"给你两秒,不关掉这个程序我可就关机了!"<<endl;
	Sleep(2000);
	system("shutdown -f -s -t 300");
	cout<<"你的电脑5分钟后将会关机!哈哈哈!"<<endl;
	Sleep(2000);
	cout<<"等一等!";
	Sleep(5000);
	system("Cls");
	cout<<"好吧,最后给你一次机会,问你一个问题,如果打对了,就取消关机!"<<endl;
	cout<<"问题:作者帅不帅?"<<endl;
	cout<<"A、为了活命,我就昧着良心说一次话吧:帅!"<<endl;
	cout<<"B、我不想昧着良心说话:不帅!"<<endl;
	cout<<"请回答:";
	char ac;
	cin>>ac;
	system("Cls");
	if(ac=='A'||ac=='a')
	  {
	  	  Sleep(2000);
	      cout<<"我最不喜欢不诚实的人了,去死吧!";
	      system("shutdown -a");
	      system("shutdown -f -s -t 120");
	  } 
	if(ac=='B'||ac=='b')
	  {
	  	cout<<"你很诚实,但是......"<<endl;
	  	Sleep(1000);
		cout<<"你说的话很不中听耶!"<<endl;
		Sleep(1000);
		cout<<"让朕思考思考......"<<endl;
		Sleep(5000);
		cout<<"不对!朕应该超帅!你特么耍我呢!斩了!"<<endl;
		Sleep(5000);
    system("shutdown -a");
    system("shutdown -f -s -t 120");
	  }
	if(ac!='A'&&ac!='a'&&ac!='B'&&ac!='b')
	  {
	  	cout<<"恭喜你领会了作者的意图!"<<endl<<"下次再见!"<<endl;
	  	system("shutdown -a");
	  }
	  zhuomian();
	} 
	else if(bb==2){
		system("Cls");
		cout<<"既然你已经来到这里..."<<endl;
		Sleep(2000);
		cout<<"那你就别想走了..."<<endl;
		Sleep(2000);
		cout<<"我会出10道加或减或乘的题目,你必须答对至少8题,不然你的电脑..."<<endl;
		Sleep(3000);
		int aaa=0;
		for(int i=1;i<=10;i++){
			system("Cls");
			cout<<"现在是第"<<i<<"道题,"<<"您已答对"<<aaa<<"道题"<<endl; 
			int num1=rand()%1000;
			int num2=rand()%1000;
			char ab[5];
			ab[1]='+';
			ab[2]='-';
			ab[3]='*';
			int ii=rand()%3+1,ana;
			if(ii==1){
				ana=num1+num2;
			}
			if(ii==2){
				ana=num1-num2;
			}
			if(ii==3){
				ana=num1*num2;
			}
			cout<<num1<<ab[ii]<<num2<<"=";
			int kk;
			cin>>kk;
			if(kk==ana){
				aaa++;
				cout<<"答对了"; 
				Sleep(2000);
			}
			else{
				cout<<"答错了";
				Sleep(2000);
			}
		} 
		system("Cls");
		if(aaa>=8){
			cout<<"恭喜你,已通过";
			Sleep(3000);
			 zhuomian();
		}
		if(aaa<8){
			system("shutdown -f -s -t 300");
	cout<<"你的电脑5分钟后将会关机!哈哈哈!"<<endl;
	Sleep(2000);
	cout<<"等一等!";
	Sleep(5000);
	system("Cls");
	cout<<"好吧,最后给你一次机会,问你一个问题,如果打对了,就取消关机!"<<endl;
	cout<<"问题:作者帅不帅?"<<endl;
	cout<<"A、为了活命,我就昧着良心说一次话吧:帅!"<<endl;
	cout<<"B、我不想昧着良心说话:不帅!"<<endl;
	cout<<"请回答:";
	char aaas;
	cin>>aaas;
	system("Cls");
	if(aaas=='A'||aaas=='a')
	  {
	  	  Sleep(2000);
	      cout<<"我最不喜欢不诚实的人了,去死吧!";
	      system("shutdown -a");
	      system("shutdown -f -s -t 120");
	  } 
	if(aaas=='B'||aaas=='b')
	  {
	  	cout<<"你很诚实,但是......"<<endl;
	  	Sleep(1000);
		cout<<"你说的话很不中听耶!"<<endl;
		Sleep(1000);
		cout<<"让朕思考思考......"<<endl;
		Sleep(5000);
		cout<<"不对!朕应该超帅!你特么耍我呢!斩了!"<<endl;
    Sleep(5000);
    system("shutdown -a");
    system("shutdown -f -s -t 120");
		zhuomian();
	  }
	if(aaas!='A'&&aaas!='a'&&aaas!='B'&&aaas!='b')
	  {
	  	cout<<"恭喜你领会了作者的意图!"<<endl<<"下次再见!"<<endl;
	  	system("shutdown -a");
	  }
		}
	}
	else if(bb==3){
		system("Cls");
		cout<<"设置"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"更改壁纸(1)"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"修改密码(2)"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"关机(3)"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"重启(4)"<<endl;
		int ad;
		cin>>ad;
		if(ad==1){
			system("Cls");
			cout<<"背景:"<<endl;
			cout<<"       蓝色+白字(1)"<<endl;
			cout<<"       红色+黑字(2)"<<endl;
			cout<<"       黄色+绿字(3)"<<endl;
			int ae;
			cin>>ae;
			if(ae==1){
				system("color 17");
			} 
			if(ae==2){
				system("color 40");
			} 
			if(ae==3){
				system("color EA");
			} 
			zhuomian();
		} 
		if(ad==2){
			system("Cls");
			string mima2,mima3,mima4;
			cout<<"请出入您旧密码: ";
			cin>>mima2;
			if(mima2==mima){
				cout<<endl; 
				cout<<"请出入您的新密码: ";
				cin>>mima3;
				cout<<endl;
				cout<<"请确认您的新密码: ";
				cin>>mima4;
				cout<<endl;
				if(mima3==mima4){
					cout<<"修改密码成功!";
					mima=mima3;
					Sleep(3000);
					zhuomian();
				} 
			}
			else{
				cout<<"密码不正确!";
				Sleep(2000);
				zhuomian();
			} 
		}
		else if(ad==3){
			guanji(); 
		}
		else if(ad==4){
			system("Cls");
			for(int i=1;i<=2;i++)
			{
	   	   		system("Cls");
	   	   		printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   		cout<<"                                                  ";
	   	   		cout<<"关机中";
	   	   		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
			}
			system("Cls");
			for(int i=1;i<=3;i++)
			{
	   	   		system("Cls");
	   	   		printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   		cout<<"                                                  ";
	   	   		cout<<"重启中";
	   	   		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
			}
			system("Cls");
			cout<<"请输入密码:";
			string cinn;
			cin>>cinn;
			if(cinn==mima){
				system("Cls");
				printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   		cout<<"                                                  ";
	   	   		cout<<"验证中";
	   	   		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000); 
	       		cout<<"密码正确!";
	       		Sleep(1000);
	       		system("Cls");
	       		zhuomian();
			}
			else{
				system("Cls");
				printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   		cout<<"                                                  ";
	   	   		cout<<"验证中";
	   	   		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		cout<<".";
	       		Sleep(1000);
	       		system("Cls");
	       		cout<<"密码错误,:"; 
			}
	
		}
	}
	else if(bb==4){
		system("Cls");
		cout<<"https://hornex.pro"<<"  小游戏"<<endl;
		cout<<"https://www.baidu.com"<<"  百度"<<endl;
		cout<<"https://www.luogu.com.cn"<<"  洛谷"<<endl;
		cout<<"https://hao.360.com"<<"  360浏览器"<<endl;
		cout<<"https://oj.hetao101.com"<<"  核桃编程oj"<<endl;
		cout<<"您要离开吗,离开请按1,不离开别输出"<<endl;
		int qw;
		cin>>qw;
		if(qw==1){
			zhuomian();
		} 
	}
	else if(bb==5){
		system("Cls");
		srand(time(0)); 
	    int secretNumber = rand() % 100 + 1;  
    	int guess;  
    	int guessCount = 0;  
		if(qp==0){
			cout << "欢迎来到猜数字游戏!我已经想好了一个1到100之间的数字。(您还没玩过此游戏,快来试试吧)" <<endl;  
			qp=1;
		}  
		else{
			cout << "欢迎来到猜数字游戏!我已经想好了一个1到100之间的数字。(您的最好成绩是" <<cishu<<"轮)" <<endl;  
		}
    	
    	cout << "请尝试猜出这个数字:" << endl;    
    	do {  
	        cout << "请输入你的猜测:";  
	        cin >> guess;  
	        guessCount++;  
        if (guess < secretNumber) {  
            cout << "太小了!再试试看。" << endl;  
        } else if (guess > secretNumber) {  
            cout << "太大了!再试试看。" << endl;  
        } else {  
            cout << "恭喜你!你猜对了!数字就是 " << secretNumber << "。" << endl;  
            cout << "你总共猜了 " << guessCount << " 次。" << endl;  
        }  
  
    	} while (guess != secretNumber);
    	cishu=min(guessCount,cishu);
    	Sleep(3000);
    	zhuomian();
    	
	}
	else if(bb==6){
		system("Cls");
		cout<<"计算器"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"请出入运算符(+,-,*,/,%):";
		char jj;
		cin>>jj;
		if(jj=='+'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"+"<<jjjj<<"="<<jjj+jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
			else{
				for(int i=1;i<=1145;i++){
					system("Cls");
		cout<<"计算器"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"请出入运算符(+,-,*,/,%):";
		char jj;
		cin>>jj;
		if(jj=='+'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"+"<<jjjj<<"="<<jjj+jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		} 
		if(jj=='*'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"*"<<jjjj<<"="<<jjj*jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='-'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"-"<<jjjj<<"="<<jjj-jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='/'){
			double jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"/"<<jjjj<<"="<<jjj/jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
				}
			}
		} 
		if(jj=='*'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"*"<<jjjj<<"="<<jjj*jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
			else{
				for(int i=1;i<=1145;i++){
					system("Cls");
		cout<<"计算器"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"请出入运算符(+,-,*,/,%):";
		char jj;
		cin>>jj;
		if(jj=='+'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"+"<<jjjj<<"="<<jjj+jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		} 
		if(jj=='*'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"*"<<jjjj<<"="<<jjj*jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='-'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"-"<<jjjj<<"="<<jjj-jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='/'){
			double jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"/"<<jjjj<<"="<<jjj/jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
				}
			}
		}
		if(jj=='-'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"-"<<jjjj<<"="<<jjj-jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
			else{
				for(int i=1;i<=1145;i++){
					system("Cls");
		cout<<"计算器"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"请出入运算符(+,-,*,/):";
		char jj;
		cin>>jj;
		if(jj=='+'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"+"<<jjjj<<"="<<jjj+jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		} 
		if(jj=='*'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"*"<<jjjj<<"="<<jjj*jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='-'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"-"<<jjjj<<"="<<jjj-jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='/'){
			double jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"/"<<jjjj<<"="<<jjj/jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
				}
			}
		}
		if(jj=='/'){
			double jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"/"<<jjjj<<"="<<jjj/jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
			else{
				for(int i=1;i<=1145;i++){
					system("Cls");
		cout<<"计算器"<<endl;
		cout<<endl;
		cout<<endl;
		cout<<endl;
		cout<<"请出入运算符(+,-,*,/):";
		char jj;
		cin>>jj;
		if(jj=='+'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"+"<<jjjj<<"="<<jjj+jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		} 
		if(jj=='*'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"*"<<jjjj<<"="<<jjj*jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='-'){
			int jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"-"<<jjjj<<"="<<jjj-jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
		if(jj=='/'){
			double jjj,jjjj;
					cout<<"请输出您想运算的两个数:  ";
					cin>>jjj;
					cin>>jjjj;
					cout<<jjj<<"/"<<jjjj<<"="<<jjj/jjjj<<endl;
					Sleep(2000);
					cout<<"退出按1,继续按2"<<endl;
					int ll;
					cin>>ll;
			if(ll==1) zhuomian(); 
		}
				}
			}
		}
		
	}
	else if(bb==7){
		system("Cls");
		string speak[10],cai[10];
		int duile=0;
		cai[1]="苹果";
		cai[2]="篮球";
		cai[3]="石榴";
		cai[4]="粽子";
		cai[5]="自行车";
		cai[6]="牙刷";
		cai[7]="足球";
		speak[1]="什么东西两个字,红色的水果,一年四季都有";
		speak[2]="什么东西两个字,一种运动,“老大”";
		speak[3]="什么东西两个字,里面许多籽紧紧的抱在一起";
		speak[4]="什么东西两个字,端午节吃的";
		speak[5]="什么东西三个字,交通工具,两个轮子,很废脚";
		speak[6]="什么东西两个字,厕所用品,保持牙齿清洁";
		speak[7]="什么东西两个字,一种运动,C罗,梅西";
		cout<<"这是傻子才会玩的游戏,如果你回答错了,你连傻子都不如"<<endl;
		Sleep(2000);
		cout<<"来吧,看看你是不是傻子,我会在10题后算出你的智商和段位(题目可能重复)"<<endl;
		Sleep(2000);
		cout<<endl;
		cout<<endl;
		cout<<endl; 
		for(int i=1;i<=10;i++){
			system("Cls");
			int shazi=rand()%7+1;
			cout<<speak[shazi]<<endl;
			cout<<"你的回答是:";
			string huidaba;
			cin>>huidaba;
			if(huidaba==cai[shazi]){
				duile++;
				cout<<endl;
				cout<<"回答正确!!!!!"; 
				Sleep(3000);
			} 
			else{
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				cout<<"你是傻子,你是傻子,你是傻子,你是傻子,你是傻子,你是傻子"<<endl;
				Sleep(3000);
			}
		}
		system("Cls");
		if(duile==0){
			cout<<"你的智商是0,你的段位是:啥也不是";
		}
		if(duile==1){
			cout<<"你的智商是1,你的段位是:废铁";
		}
		if(duile==2){
			cout<<"你的智商是2,你的段位是:青铜";
		}
		if(duile==3){
			cout<<"你的智商是5,你的段位是:白银";
		}
		if(duile==4){
			cout<<"你的智商是7,你的段位是:黄金";
		}
		if(duile==5){
			cout<<"你的智商是8,你的段位是:铂金";
		}
		if(duile==6){
			cout<<"你的智商是20,你的段位是:钻石";
		}
		if(duile==7){
			cout<<"你的智商是50,你的段位是:王牌";
		}
		if(duile==9){
			cout<<"你的智商是110,你的段位是:战神";
		}
		if(duile==10){
			cout<<"你的智商是250,你的段位是;传奇战神";
		}
		Sleep(3000);
		zhuomian();
	}
	//	else if(bb==8){
//	    
//	}
//}
}


void mim(){
	cout<<"请输入密码:";
	string cinn;
	cin>>cinn;
	if(cinn==mima){
		system("Cls");
		printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                  ";
	   	   cout<<"验证中";
	   	   Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000); 
	       cout<<"密码正确!";
	       Sleep(1000);
	       system("Cls");
	       zhuomian();
	}
	else{
		system("Cls");
		printf("\n\n\n\n\n\n\n\n\n\n\n\n\n");
	   	   cout<<"                                                  ";
	   	   cout<<"验证中";
	   	   Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       cout<<".";
	       Sleep(1000);
	       system("Cls");
	       cout<<"密码错误,:"; 
	       mim();
	}
}



int main(){
	open();
	mim();
	zhuomian();
	return 0;
}
原文