int main()//关机代码
{
char sum [30] = {};
system("shutdown -s -t 60");
agin:
printf("您的电脑将会在一分钟内关机,除非你输入‘我是猪’\n请输入>:");
scanf("%s", sum);
if (strcmp(sum, "我是猪") == 0)
{
system("shutdown -a");
}
else
{
printf(" \n");
printf(" \n");
printf("再给你一次机会\n");
printf(" \n");
Sleep(3600);
system("cls");
goto agin;
}
return 0;
}
刚刚学关机代码
猜你喜欢
转载自blog.csdn.net/m0_66780695/article/details/128717422
今日推荐
周排行