#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char input[20] ={0};
system("shutdown -s -t 60");
again:
printf("请注意,你的电脑还有一分钟关机,输入:我是猪,就会取消关机\n请输入>:");
scanf("%s",input);
if(strcmp(input,"我是猪")==0)
{
system("shutdown -a");
}
else
{
goto again;
}
return 0;
}
标签:关机,again,代码,system,shutdown,input,include From: https://blog.51cto.com/u_15841203/5826107