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


Implement, in rPeANUt, the a Fibonacci function by using the simple recursive approach. The Fibonacci function can be implemented in c as follow: int fib(int x) {   if (x

THIS PROGRAM IS TO COMPARE THE TWO DATES GIVEN BY THE USER #include #include #include struct date  {   int dd;   int mm;   int yy;  }; date compare(date d1,date d2)  {

color representation 0,1,2,3,4,5,6,7...

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Explain about the Constants in c language? The Constants in C refer to fixed values that don't change during the execution of a program. C has four fundamental types of constan

THIS PROGRAM IS TO ASK A DATE & ALSO ASK FOR DAYS TO BE ADDED TO PRODUCE #include #include struct date  {   int dd;   int yy;   int mm;  }; void main()  {  clrscr();  in


Define a function in c program: int f1() { static int x=10; return x; } int f2() { int y=5; return y; } extern int z; void f()     {