#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main( void )
{
int num;
int n ;
int times = 0;
srand(time(NULL));
num = rand()%100+1;
for(times=1;times<=10;times++)
{
printf("Please input a number:\n");
scanf("%d",&n);
if(n==num)
{
printf("Right\n");
break;
}
if(n>num)
{
printf("输入值大了!\n");
}
if(n<num)
{
printf("输入值小了!\n");
}
printf("%d\n",times);
}
return 0;
}