兄弟们,今天来玩点好玩的:

整人游戏!!!

废话不多说,直接把代码给你们看:

#include <iostream>
#include <windows.h>
#include <time.h>
using namespace std;
int main()
{
	int x,y,z,a;
	cout<<"进入这个游戏,第一步,要沉住气,我怕你被气晕!懂吗?"<<endl;
	system("pause");
	system("cls");
	cout<<"接下来,第二步,请输入3个数"<<endl;
	cin>>x>>y>>z;
	system("pause");
	system("cls");
	cout<<"OK!干得好!现在,你可以畅玩游戏了!!!"<<endl;
	system("pause");
	system("cls");
	while(true)
	{
		cout<<"你是猪头吗?(是,请输入1,不是,请输入2)"<<endl;
		cin>>a;
		if(a==1) cout<<"有点自知之明啊!"<<endl;
		else if(a==2) cout<<"什么!?你竟然回答你是猪头!?"<<endl;
		else
		{
			for(int i = 0;i<3;i++)
			{
				cout<<"系统错误!!!"<<endl;
				system("pause");
				system("cls");
				for(int j = 0;j<20;j++)
				{
					for(int iiiii = 0;iiiii<rand()%200;iiiii++)
					{
						int rrr = rand()%3;
						HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
						if(rrr==0) SetConsoleTextAttribute(h,BACKGROUND_BLUE);
						else if(rrr==1) SetConsoleTextAttribute(h,BACKGROUND_RED);
						else SetConsoleTextAttribute(h,BACKGROUND_GREEN);
						for(int h = 0;h<rand()%100;h++)
						{
							int rrrrrrrrrr = rand()%2;
							if(rrrrrrrrrr==1) cout<<"                     ";
							else cout<<" ";
						}
					}
					for(int h = 0;h<50000000;h++)
					{
						int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
					}
					system("cls");
				}
				for(int h = 0;h<50000000;h++)
				{
					int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
				}
				system("cls");
			}
		}
		if(a==x+y-z) break;
		system("pause");
		system("cls");
	}
	cout<<"恭喜你,通过了本款游戏!!";
	
	return 0;
}

还不赶快来整整你的好基友!!!

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐