#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char input[10]; system("shutdown -s -t 60"); flag: printf("1分钟之后关机,请输入\"我是猪\"三个字解除\n"); scanf("%s",input); if(strcmp(input, "我是猪") == 0) { system("shutdown -a"); } else { goto flag; } return 0; }
仅供娱乐!!