programwrite a program that predicts users age


Program:

Write a program that predicts users' age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial guess). The user responds with 'O' for older', 'Y for 'younger' and 'X' for 'you got it!'

Use a while loop to ask user whether his/her age is '>', '<' or '=' the guess. Update the guess using the binary search method. Note that you are not allowed to use "break".

 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: programwrite a program that predicts users age
Reference No:- TGS0204627

Expected delivery within 24 Hours