这些代码如自己不小心在自己电脑上可以通过重启解决
鼠标移动小代码
#include<windows.h>
#include<cstdlib>
#include<ctime>
using namespace std;
int main()
{
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN);
srand(time(0));
int p = 0;
p = p * 10 + 5;
p = p * 10 + 4;
p = p * 10 + 1;
p = p * 10 + 8;
p = p * 10 + 8;
while(p)
SetCursorPos(rand()%x,rand()%y);
return 0;
}
强制关机
#include<bits/stdc++.h>
#include<Windows.h>
using namespace std;
int main(){
long long a;
srand(time(NULL));
cout<<"开";
a=(rand()*rand()*rand())%2000+1000;
Sleep(a);
cout<<"\b\b"<<"关";
Sleep(400);
system("shutdown/p") ;
}
会的不多只求一赞