#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
char a[20] = { 0 };
printf("关机倒计时60S,请输入密码:\n");
system("shutdown -s -t 60");
while (1) {
scanf("%s", a);
if (strcmp(a,"我是猪") == 0)
{
system(" shutdown -a");
printf("已停止关机");
break;
}
else
{
printf("密码错误,请重新输入:");
}
}
return 0;
}
关机输入密码停止
最新推荐文章于 2024-07-18 11:11:00 发布