#include <stdio.h> #include <string.h> #include <stdlib.h> int main(){ char time[10]; char cmd[100] = "at "; printf("输入关机时间:"); scanf("%s",time); strcat(cmd,time); strcat(cmd," shutdown -s"); system(cmd); return 0; }