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
finds the average for all assignments for an individual student float getAverageForStudent(float scores[20][10], int student, int numAssignments) {  }  // finds the average for

#Hi, I''m planning to derive the escape velocity through C++. I would just like to know if it''s possible to differentiate symbolic functions? Do I need to download libraries,etc?

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given

1. Basic Heap: Each memory location in our model of the RAM will be an instance of type Memory: 2. typedef union Memory_u Memory; 3. union Memory_u{ 4. char character;

Explain the Bitwise-Inclusive-OR Operator: |? The bitwise-inclusive-OR operator (|) contrast each bit of its first operand to the corresponding bit of its second operand and if

c program for padovan string   Padovan series are positive integers obtained by the following process: The Padovan series is the sequence of integers P(n) defined by the

Define  T y pe c o m p a t i b i li t y? T o a s s i g n i n t t o s m a l l i n t t h e v a r i a b l e should b e

how we can code in c++ for assignment problem (operation research) method to mkinimization and mamization

I have a mini project where I need to write a code .wonder if someone can help me.I already have the forms and webmaster page done just need to code portion