Write a program that predicts users age, C/C++ Programming

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

Posted Date: 2/14/2013 4:35:21 AM | Location : United States







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

Write discussion on Write a program that predicts users age
Your posts are moderated
Related Questions
in this problem you are given a board in which some of the elements are placed as shown in below diagram.each element represent a color.fill the other element in the board,such tha

how c program starts executing?

Newton's method for cube roots is based on the fact that if y is an approximation to the cube root of x, then a better approximation is given by the value: (x/y 2 +2y)/3 (a)

Explain the Declaration of Multi Dimensional Arrays? In the figure, the range in the first dimension is 3 and in the second dimension is 4. The shaded portion corresponds to th

padovan string generation till 40

What is MIME? MIME - Multi-purpose Internet Mail Extensions. MIME types signifies a standard way of classifying file types over Internet. Browsers and Web servers have

want the codings for these topic in ur experts minds.com


how to convert a general tree into binary tree with example

i want a c or c++ code for solving transportation problem using modified distribution method