- 鲍俊豪 的博客
作死
- 2023-11-25 20:18:29 @
关机1.0
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
cout<<"关机喽";
system("shutdown -s -t 1");
return 0;
}
关机
关机2.0
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
srand(time(0));
int x=0, y=0;
while(1){
x = rand()%1000+300;
y = rand()%600+300;
SetCursorPos(x, y);
}
return 0;
重启
}
关机3.0
#include<windows.h>
#include<bits/stdc++.h>
using namespace std;
int main(){
system("Shutdown -s -t 10");
HWND hwnd;//乱
hwnd=FindWindow("ConsoleWindowClass",NULL);
if(hwnd) ShowWindow(hwnd,SW_HIDE);
int x=GetSystemMetrics(SM_CXSCREEN);
int y=GetSystemMetrics(SM_CYSCREEN); srand(time(0));
while(1)cout<<"Oh!!!<<endl&&SetCursorPos(rand()%x,rand()%y);
}
休眠
`
没看提示别乱用,
乱用计算机损坏不负责