Question: replay the game does not work.It can not recognize n when you want to quit. include int main (int argc, char **argv) t int a

 replay the game does not work.It can not recognize n when
replay the game does not work.It can not recognize n when you want to quit.

include int main (int argc, char **argv) t int a 1; number between 1 and 100 and press "); while (a){ printf("Thinkf int high=100; int low=1; a char str; while (high >= low) { getchar) int mid= (high + low) / 2; printf ("Is it higher than d? y)n",mid) scanf (&str) if ( str=-'y ') { low= (mid+1 ) ; } else if ( str== 1 n' ) { high= (mid-1); }else {printf ("Type yar n"); printf(" >>>>>> The number is %d ",high+1); to continue playing (y) ?1n) printf ("Do you want scanf ( "%c", &str) ; getchar ) if ( str== n' ) { a=0; } ("Thanks for playing!!!")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!