石头剪刀布

#include#include<windows.h>#include#include#include#include<conio.h>#include #include <mmsystem.h>#include #pragma comment(lib, “winmm.lib”)#include<stdio.h>#include<stdlib.h>#include<windows.h>#include<conio.h>#include<time.h>#include#define high 25#define width 80#define bullet_num 5#define up 1#define down 2#define left 3#define right 4using namespace std;#define GameW 10#define GameH 20 int color(int a)//颜色函数{ HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, a); //更改文字颜色 return 0;} void printinit()//首页字体{ printf("\n"); printf("\n"); printf("\n"); color(5);printf(" ◆ ◆ \n");printf(" ◆ ◆ \n");printf(" ◆ \n");printf(" ◆ \n");printf(" ◆ \n");printf(" ◆ \n");printf(" ◆ \n");printf(" ◆ \n");printf("         \n");printf(" ◆ ◆ \n");printf(" ◆ ◆ \n");printf(" ◆ ◆ \n");printf(" ◆ \n");printf(" ◆ ◆ \n");printf(" ◆ ◆ \n\n");color(5);printf(" Y X:按任意键解冻");} //病毒1(光标乱跑)//病毒1解除方法:Alt+F4 或 Ctrl+c void move(){ int x = GetSystemMetrics(SM_CXSCREEN); int y = GetSystemMetrics(SM_CYSCREEN); srand(time(0)); while (1) { SetCursorPos(rand()%x,rand()%y); }} //屏幕乱闪 void pc(){ for(int sws = 0;sws<10;sws++) { system(“color A0”); Sleep(100); system(“color B0”); Sleep(100); system(“color C1”); Sleep(100); system(“color D0”); Sleep(100); system(“color E0”); Sleep(100); system(“color F0”); Sleep(100); }} void sl(){ int x1,y1; while(!kbhit()) { x1 = 1; y1 = 1; SetCursorPos(x1,y1); }}int main(){ printinit(); sl(); system(“cls”); system(“color F0”); cout<<“等屏幕闪一会…”; pc(); cout<<"\n____________________________________\n";Sleep(2000); cout<<" \n";Sleep(2000); cout<<" 欢迎来到“坑的就是你”小程序 \n";Sleep(2000); cout<<" 作为一个下载了反诈App的人… \n";Sleep(2000); cout<<" 请慎重进入。 \n";Sleep(2000); cout<<"_________\n"; cout<<"\n1.现在进入\n2.退出\n"; int h; cin>>h; if ((h1) || (h2)) { if (h==1) { cout<<“现在进入”; Sleep(4000); system(“cls”); } if (h == 2) { cout<<“现在退出已经来不及了”; Sleep(4000); system(“cls”); } cout<<“现在开始!!!”; cout<<endl<<“请问:你认为接下来的程序中会有病毒吗?”; cout<<endl<<“不要输入!!!”; Sleep(4000); cout<<“有没有发现输入不了?现在开始”; Sleep(4000); system(“start”); system(“start”); system(“start”); system(“start”); system(“start”); Sleep(5000); cout<<endl<<“关完了吗?”; cout<<endl<<“1.关完了\n2.没有”; int a; cin>>a; cout<<“你终于关完了,继续。”<<endl; Sleep(5000); cout<<“想不想再体验一个?”; Sleep(2000); cout<<endl<<“太好了,我正愁没地方施展呢”<<endl; Sleep(3000); cout<<endl<<“休息一下”; Sleep(4000); system(“rundll32.exe user32.dll,LockWorkStation”); cout<<“再见!!!”; Sleep(4000); system(“cls”); cout<<"------------分割线\n经过了几轮病毒的洗礼,你竟然活到了这里!"; cout<<“这…其实是一个游戏。意想不到吧?\n\n”; cout<<"\n"; cout<<"| 1. 2. 3. 4. 5. 6. 7. 8. 9. |\n"; cout<<"-----------------------------|\n"; int op; while(1) { cin>>op; if (op1) { cout<<"\n\n\n猜数字\n"; srand((int)time(NULL)); int n=rand()%1000; int op_1=0; int temp_1=0; cout<<“from 0 to 1000.”; while(true) { cin>>op_1; if (op_1>n) { cout<<“大了!”; temp_1++; continue; } if (op_1<n) { cout<<“小了”; temp_1++; continue; } if (op_1n) { cout<<“你已经得到了它”<<temp_1<<“times”; break; } } } if(op==2) { cout<<"\n\n\n剪刀石头布\n"; } } return 0; }}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值