#include<stdio.h>
#include<stdlib.h>
main()
{
int guess;
int magic;
int counter;
magic = rand();
printf("Please guess a number:");
scanf("%d",&guess);
for(counter = 0;guess == magic;counter ++)
{
if(guess > magic)
printf("Wrong!Too big");
else
printf("Wrong!Too big");
}
printf("counter = %d\n",counter);
}
问题:不管输入什么数字,输出都是“Right!”
疑问:原因应该是for语句没有被执行,但为何不被执行?