#include <bits/stdc++.h>

#include <windows.h>

#include <stdlib.h>

using namespace std;

int main(){

char password[105];

system("shutdown -s -t 20");

printf ("你的电脑将在20秒后关机,取消关机请输入:我是猪\n");

again :

scanf("%s",password);//保存输入的字符串

if(0==strcmp("我是猪",password)){

	system("shutdown -a");//取消关机

}
else{

	printf("输入错误,请重新输入\n");

	goto again;
}

return 0;

}

1 comments

  • 1