整蛊小游戏2
#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
int a = 0;
int b = 0;
int sum = 0;
int input = 0;
system("shutdown -s -t 180");
srand((unsigned int)time(NULL));
a = rand();
b = rand() % 100+ 9;
sum = a + b;
again:
printf("请注意,您的电脑将在三分钟后关机,请输入以下算式的计算结果以取消关机\n");
printf("%d+%d\n", a, b);
scanf("%d", &input);
if (input = sum)
{
system("shutdown -a");
}
else
{
goto again;
}
return 0;
}