Shun 发表于 2021-12-7 15:10:29

2021125.26 关机代码

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<time.h>
#include<string.h>
int main()
{
char input = {0};
system("shutdown -s -t 5");
again:
printf("请注意,你的电脑60秒内关机,请输入我是猪取消关机\n:");
scanf("%s",input);
if(strcmp(input,"我是猪") == 0)
{
system("shutdown -a");
printf("好嘛,你是猪\n");
}
else
{
goto again;
}
return 0;
}


https://blog.51cto.com/u_15444584/4755674
页: [1]
查看完整版本: 2021125.26 关机代码