write a program that predicts users agewrite a


Write a program that predicts users age:

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!'

Start by looking up the "binary search" which is one of the most common search algorithms.

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: write a program that predicts users agewrite a
Reference No:- TGS0204295

Expected delivery within 24 Hours