/* HELLO.C -- Hello, world */
#include "stdio.h"
#include "conio.h"
main()
{
    int number,guess,i=0;
    number=rand();
    while(1)
    {
    printf("Please enter your guess:");
    scanf("%d",&guess);
    i++;
    if(guess=number)
    {
    printf("congratulations! you guess right in %d Guesses!",i);
    break;
    }
    else
    {
    if (number<guess)
    printf("You guess low!\n");
    else
    printf("You guess high!\n");
    }
    }
    getch();
}
为什么我每次输入数字都是显示对的呢?



 
											





 
	    

 
	

