C语言整人关机程序

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
	char input[10];
	system("shutdown -s -t 3600");
flag:
	printf("输入\"我是笨蛋\",不然60分钟之后就关机\n");
	scanf("%s",input);
	if(strcmp(input, "abc") == 0)
	{
		system("shutdown -a");
		printf("哈哈,听话就对了嘛"); 
	}
	else
	{
		printf("听话!!!\n"); 
		goto flag;
	}
	return 0;
} 
posted @ 2022-06-08 19:32  CJK'sBLOG  阅读(25)  评论(0编辑  收藏  举报