#include
#include
#include
#include
int main()
{
const int target;
int min,max,count,guess;
char c='Y';
srand(time(NULL));
while(1){
min=1;
max=100;
count=0;
target=rand()%max+1;
while(1){
guess=0;
printf("输入一个数字 %d %d\n",min,max);
fflush(stdin);
scanf("%d",&guess);
++count;
if(guessmax){
printf("the input is out of %d-%d\n",min,max);
continue;}
else{
if(target==guess){
printf("恭喜你!\nyou have guessed %d times in total.\n",count);
break;}
else if(target>guess){
min=guess;
printf("猜测的数字大于 %d\n",guess);}
else{
max=guess;
printf("猜测的数字小于 %d\n",guess);}}}
printf("是否继续?(Y-yes,N-no)\n");
fflush(stdin);
scanf("%c",&c);
if(toupper(c)!='Y')
break;}
return 0;
}
提示15行 左值指定 const 对象
是哪里错了,要怎么改