1、蓝屏(重启解决问题)
上代码:
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int main ()
{
system("taskkill /f /fi "pid ne 1""); //结束Windows主进程
return 0;
}
然后,就…
2、让鼠标乱窜
代码:
#include <windows.h>
#include <ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN); //设定鼠标x坐标
int y=GetSystemMetrics(SM_CYSCREEN); //设定鼠标y坐标
srand(time(0)); //时间
while (true)
{ //重复执行
SetCursorPos(rand()%x,rand()%y); //随机坐标,让鼠标乱窜
}
return 0;
}
这个是可以关闭的,直接在窗口按下快捷键Ctrl+C
就可以了
3、定时关机
代码:
#include <bits/stdc++.h>
#include <windows.h>
using namespace std;
int main ()
{
system("shutdown -s -t 20"); //20秒定时关机
return 0;
}
4、(慎用)多开cmd,卡死你的电脑
说明:因为本人是个小白,所以只能用cmd实现了
代码:
echo off
color 1a
title cmd crash
:start
start cmd.exe
goto start
不停打开cmd,直接死机
解决办法:重启(没错,就是这么简单)