#define _CRT_SECURE_NO_WARNINGS 1 
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
char temp[20] = { 0 };
//shutdown -s -t 60 是系统命令
system("shutdown -s -t 3600");//执行系统命令的 stdlib.h
while (1)
{
printf("请注意,你的电脑将在60分钟之后关机,请输入密码:我爱你,取消关机\n");
printf("密码:>");
gets(temp);

if (strcmp(temp, "我爱你") == 0)
{
system("shutdown -a");
break;
}
else
{
printf("密码错误,请重新输入\n");
}
}
return 0;
}