#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char input[20] = { 0 };
system("shutdown -s -t 60");
again:
printf("你的电脑将会于一分钟后关机,如果输入:取消,则取消关机\n请输入:");
scanf_s("%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_16253936/7487470