Question #19642

guess this number is a game, which can be played by two players. one player specifies a number in his mind the second player has the right to ask a limited number of questions through which he should guess the number. the questions are as below:
is the number greater than G?
is the number less than L?
is the number greater than x?
is the number greater than y?
in each case the answer would be "yes" or "no". rite a program that accepts a 4 digits number through the input, and then lets the user to find the answer for the above 4 questions then user can make up to 10 guesses. in each round , the program outputs "high", if the guess is greater and "lo"if the guess is less than the target number. if the second player finds the exact number then the program displays"bingo" message. otherwise, after 10 guesses the program gives a score from 1 to 5 according to the proximity of the final guess to the chosen number. the score would be given based on the proximity percentage.

Expert's answer

Unfortunately, your question requires a lot of work and cannot be done for free.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

Submit it with all requirements as an assignment to our control panel and we'll assist you.

## Comments

## Leave a comment