我写的最蠢的代码

        去年的九月份,我还是个懵懂无知的五年级小学生。有一次看到六年级学长写的病毒的代码,我对电脑病毒有了浓厚的兴趣。

        我开始学习让鼠标乱飞的代码,

#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h> 
using namespace std;
int main()
{
    int x=GetSystemMetrics(SM_CXSCREEN);
    int y=GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    while(1)
    SetCursorPos(rand()%x,rand()%y);
	
    return 0;
}

给他取名611。

        成功的当作业发给了老师,我也成功地写了份检讨。我表面上服了,但是心里还是气鼓鼓的。于是我就发明了711。

#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h> 
using namespace std;
int main()
{
	int a=0;
	while(a!=1)
	{
		system("start cmd");
	} 
    return 0;
}

       这表面上是一个弹窗终端的代码,但成功把我的电脑卡死,一直把我的电脑消耗到没电,因为我是笔记本电脑,当初还没有关机按钮。

      这回我吸取了教训,我在电脑上安了个虚拟机。发明了611 2.0。

#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h> 
using namespace std;
int main()
{
    int x=GetSystemMetrics(SM_CXSCREEN);
    int y=GetSystemMetrics(SM_CYSCREEN);
    srand(time(0));
    while(1)
    SetCursorPos(rand()%x,rand()%y);
	int a=0;
	while(a!=1)
	{
		system("start cmd");
	} 
    return 0;
}

一次电脑课上,把我的作业起名为611,于是我把真的611发给了老师。我也成功的拿到了2000字捡讨大礼包,所以小心使得万年船啊。

  • 4
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值