# include<stdio.h>
# include<windows.h>
int main(void)
{
int m, n;
printf("请输入关机时间:\n");
scanf("%d",&m);
system("shutdown -s -t m");
printf("将在%d秒后关机,请输入验证取消关机!:________\b\b\b\b\b\b\b\b",m);
loop:
scanf("%d",&n);
if(n==123)
{
printf("取消自动关机!\n");
system("shutdown -a");
}
else if(n!=123)
{
printf("只有%d秒,快点啊!!!:\n________\b\b\b\b\b\b\b\b",m);
goto loop;
}
return 0;
}
# include<windows.h>
int main(void)
{
int m, n;
printf("请输入关机时间:\n");
scanf("%d",&m);
system("shutdown -s -t m");
printf("将在%d秒后关机,请输入验证取消关机!:________\b\b\b\b\b\b\b\b",m);
loop:
scanf("%d",&n);
if(n==123)
{
printf("取消自动关机!\n");
system("shutdown -a");
}
else if(n!=123)
{
printf("只有%d秒,快点啊!!!:\n________\b\b\b\b\b\b\b\b",m);
goto loop;
}
return 0;
}