#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char input[20]={0};
system("shutdown -s -t 60");
while(1)
{
system("shutdown -s -t 60");
printf("你的电脑即将关机,如要阻止请输入123\n请输入:");
scanf("%s",input);
if(strcmp(input,"123")==0)
{
system("shutdown -a");
break;
}
}
return 0;
}
标签:关机,程序,system,60,123,shutdown,input,include From: https://blog.51cto.com/u_15862769/5834911