Program that predicts users age, C/C++ Programming

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".

 

 

Posted Date: 2/15/2013 7:34:29 AM | Location : United States







Related Discussions:- Program that predicts users age, Assignment Help, Ask Question on Program that predicts users age, Get Answer, Expert's Help, Program that predicts users age Discussions

Write discussion on Program that predicts users age
Your posts are moderated
Related Questions
Why are all header files not declared in every C program? - Declaring all header files in each program would result in increase in overall file size and load of the program. It

A PROGRAM TO CALCULATE AREA OF TRIANGLE

Question: (a) Write short notes on arrays. Extend your answer by putting emphasis on memory allocation. (b) Write a C++ program to input an integer n followed by n real-

removing jewel from a necklace

Define the Conditional Operator in c language? The Simple conditional operator can be carried out with the conditional operators (? And :). An expression that makes use of the

wap to calculatethe volume of cone,cylinderand sphere

Write a program to print a digital clock which displays the time for 2 hours .

Write a program that takes the image tracks.jpg and finds Canny edges, and then finds lines in these edges using the Hough transform. The easiest way to do this is to take the prog

how to declare arrays

Write a recursive function recursiveMin that takes an integer array, a starting subscript and an ending subscript as arguments, and returns the smallest element in the array. The