怎么会无限循环下去!
# include <stdio.h>int main (void)
{
const int secret_code = 510;
int enter_code;
printf ("Please Enter The Code:");
scanf ("%d", &enter_code);
do
{
printf ("Sorry! Try Again!\n");
printf ("Please Enter The Code:");
scanf ("%d", &enter_code);
}while (secret_code != enter_code);
printf ("Congratulations!\n");
return 0;
}
我输入字母d之后 就进行了无限循环。为什么?