Write a program that predicts users age, C/C++ Programming

Assignment Help:

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


Related Discussions:- Write a program that predicts users age

#title minimization and maxmization assignment problem, how we can code in ...

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

Functions, program that convert take decimal digit and convert it to binart...

program that convert take decimal digit and convert it to binart digit

Stone game, A game is played with three piles of stones and two players. At...

A game is played with three piles of stones and two players. At her turn, a player removes one or more stones from the piles. However, if she takes stones from more than one pile,

Vb.net, write a program that would accept the radius of the sphere and retu...

write a program that would accept the radius of the sphere and return its surface area.

Software crisis, defining software crisis As the technology changes ra...

defining software crisis As the technology changes rapidly the requirement for the users' change, to part the growing demand of the user for trade,  business, and personal

Data types, #question write a prog c & cpp

#question write a prog c & cpp

Dds, dsgdgdgdfgegwfesfsddfvxvwe

dsgdgdgdfgegwfesfsddfvxvwe

Explain external variables, External Variables Different functions of t...

External Variables Different functions of the similar program can be written in different source files and can be compiled together. The scope of a global variable is not limit

Develop diablo 2 lod 1.13d dupe method for closed battle.net, Develop Diabl...

Develop Diablo 2 LOD 1.13d Dupe Method for Closed Battle.net This hack is for diablo 2 lord of destruction The program must work on all realms, all cores, all ladders (4x rea

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