main()
{
char enterpassword,password="abc";
printf ("please enter the password\n");
scanf ("%s",&enterpassword);
loop:
if (password!=enterpassword)
{
printf ("password is wrong!\n");
scanf("%s",&enterpassword);
goto loop;
}
else
{
clrscr();
printf("**********************************************************\n");
printf(" welcome!\n");
printf("**********************************************************\n");
exit(0);
}
}
上面的代码不知错在那里,请高手来帮忙。
运行后输入abc。为什么不会结束啊?