附上代码:
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main()
{
char input[20] = {0};
system ("shutdown -s -t 60");
again:
printf("请注意,你的电脑将在1分钟内关机,如果输入:1,就会取消关机\n");
scanf("%s",input);
{
if (strcmp(input,"1") == 0)
{
system("shutdown - a");
}
else
{
goto again;
}
}
return 0;
}
标签:关机,again,程序,system,shutdown,input,include From: https://blog.51cto.com/u_15858801/5826362