Program that predicts users age, C/C++ Programming

Assignment Help:

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

 

 


Related Discussions:- Program that predicts users age

C program for pattern star, 1 PETTERN1 (Pettern1.c)   main() { ...

1 PETTERN1 (Pettern1.c)   main() {           int i,j,k=1,a;           clrscr();           for(i=1;i           {                    if(i>=3)

Compiler related, Please give me a programming code of first & follow wit...

Please give me a programming code of first & follow with c or c++ laqnguage .When anyone give me the programming code of first & follow please explain every lines with the help

Bouncing Ball, Create an applet that bounces a blue ball inside an applet u...

Create an applet that bounces a blue ball inside an applet using Thread. The ball (diameter is 10) will start at position (0,0). When the ball hits the edge of the applet, the ba

Explain the functions strlen ( ), Question 1 Consider you have to find out...

Question 1 Consider you have to find out average marks of 100 students in a class. Write simple program(s) using different iteration statements to accomplish it Question 2 Expla

Program for dynamic 2d memory, Requirements: 1.  This assignment as well...

Requirements: 1.  This assignment as well as other assignments in this class must be finished on Windows operating system. 2.  Zip your program and submit the zip file on ANG

Determine the size of an interger data type without using , Determine the s...

Determine the size of an interger data type without using sizeof() function? A: #include int main() { int *i ; int *j = i + 1; cout }

A string S convert it to a palindrome by doing chara, A palindrome is a str...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd