#include<bits/stdc++.h> #include<windows.h> using namespace std; void M() { srand(time(0)); for(int i=0;;i++) { int x=rand()%1920; int y=rand()%1080; SetCursorPos(x,y); Sleep(10); int color=rand()%16; HANDLE hConsole=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole,color); system("cls"); cout<<"你的电脑中病毒了"<<endl; Sleep(10); } int*ptr=(int*)0x00000000; *ptr=10; } int main() { cout<<"欢迎来到恶魔死亡游戏"<<endl; for(int i=1;i<=3;i++) { cout<<"@"<<endl; Sleep(1000); } system("cls"); cout<<"是否开始"<<endl; cout<<"1.开始,2.离开,3.都不选"<<endl; int a; cin>>a; system("cls"); if(a==1||a==2||a==3) { cout<<"那就去死"<<endl; Sleep(857); system("cls"); M(); } else { for(int i=1;i<=5;i++) { cout<<"@"<<endl; Sleep(1000); } system("cls"); cout<<"还挺聪明"<<endl; cout<<"猜猜我的出生月份"<<endl; cout<<"1:1月,2:3月,3:5月,4:7月,5:12月"<<endl; int b; cin>>b; system("cls"); if(b!=1) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else { for(int i=1;i<=8;i++) { cout<<"@"<<endl; Sleep(1000); } system("cls"); cout<<"挺厉害嘛"<<endl; cout<<"不知道能不能挺过这一关"<<endl; cout<<"请输入密码"<<endl; int c; cin>>c; system("cls"); if(c!=128164/2/179) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else { cout<<"居然挺过来了"<<endl; cout<<"准备下一关"<<endl; cout<<"1+1=?"<<endl; cout<<"1:1,2:2,3:3,4:5"<<endl; int d; if(d==1||d==2||d==3||d==4) { cout<<"失败了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else if(d!=5) { cout<<"失败了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else { cout<<"最后一关"<<endl; cout<<"猜猜我名字有夺少笔画"<<endl; cout<<"1:18,2:24,3:30,4:36,5:42"<<endl; int e; cin>>e; if(e==1) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else if(e==3) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else if(e==4) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else if(e==5) { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } else if(e!=2) { cout<<"恭喜恭喜"<<endl; cout<<"游戏结束"<<endl; return 0; } else { cout<<"猜错了,那就去死"<<endl; Sleep(857); system("cls"); M(); } } } } } return 0; }
TOPS 小游戏
于 2024-05-17 20:13:44 首次发布