#include<stdio.h>
#include<stdlib.h>
//#include<string.h>//运行时把这里加上,为了看其他部分的问题,string.h是在strcmp函数中的头文件
int main()
{
char input[20]={0};
system("shutdown-s-t 60");
again;
printf("请注意,你的电脑将在一分钟后关闭,如果输入:你好,则取消");
scanf("%s",&input);
if(strcmp(input,"你好") == 0)
{
system("shutdown-a");
}
else
{
goto again;
}
return 0;
}
运行电脑关机程序,但是在goto语句运用中为什么again显示未定义(有一个小问题)。