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
i have an array of structs, and am trying to make a pointer that can point to a certain struct within the array

In this assignment you are required to develop a program that allows the creation, viewing and storage of information about ITECH7603 Students. In order to complete the task you ha

who to write max if statements in a program

In the Byteland country a string "s" is said to super ascii string if and only if count of each charecter in the string is equal to its ascci value in the byteland country ascii co


In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc

Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program and press "random" button to spoof to

How to write an inline class member function In addition to global functions, you may request that non-static member functions of a class be inlined.  The normal method of doin


Environment - C, Linux Duration - December 2006 to Feb 2007 Description - TR-106 specifies a generic data model template applicable for all TR-069 enabled devices. Adde