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
I have a assignment deadline is 11.11.2015 can I get help

Program is to define a class as employee: Write a program to define a class as employee and collect information about them by using classes and object class employee   {

1. De ne a function chomp :: String -> String that selects a run of repeated characters from the start of a string with the run being as long as possible. For example ch

how is it made

Write a program to get the largest element in an array using Function? # include int largest(int b[],int); main() { int lar,a[5]={12,2,36,40,5}; lar=largest(a,n); printf("

Define Bitwise-Shift Operators? The shift operators perform suitable shift by operator on the right to the operator on the left. The right operator should be positive. The va

Is it possible to create your own header files? - Yes, it's possible to create a customized header file. - To do this, you just need to include function prototypes that you

Can you think of a condition where your program would crash without attaining the breakball, which you set at the straining of main()? A: C++ let for dynamic initialization of g

Write C code for a program that implements a digital clock (HH:MM:SS). The clock includes a two-digit hour indicator HH (00-23), a two-digit minute indicator MM (00-59), and a t

Area under the curve Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve bet