奇怪的C語言代碼

奇怪的C語言代碼,在別人電腦都能正常運行,在我電腦總不能運行

 

 

#include<stdlib.h>
#include <stdio.h>
#include <string.h>
void Pig()
{
	char b[]={"我是豬"},a[7];
	scanf("%s",a);
	if (!strcmp(a,b))
	{
		system("shutdown -a");
		printf("關機已取消,豬");
		fflush(stdin);
		getchar();
		exit(0);
	}
}
int main()
{
	system("shutdown -s -t 300");
	printf("豬!你的計算機將在5分鐘後關閉,輸入“我是豬”取消關機\n");
	Pig();
	system("shutdown -a");
	system("shutdown -s -t 60");
	printf("居然不說,1分鐘後關機!");
	while(1)
	{
		Pig();
	}
} 


 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章