Question: Write a Mars program that lets the user play the High-Low guessing game. Hard code a number between 0 and 100 into memory location hide
Write a Mars program that lets the user play the High-Low guessing game. Hard code a number between 0 and 100 into memory location hide. The user is then given 5 guesses to determine the hard-coded number. For each guess the program must:
If the guess is incorrect tell the user if the guess is above (high) or below(low) the hidden value and tell the user how many guesses remain.
If the user guesses correctly, an appropriate congratulatory message should be displayed.
If the user uses all their guesses display that they lost and tell them the hidden number.
Example:
**** Guess what number I have hidden(0-100). You can have 5 guesses. ****
Enter your guess: 75
Your guess is high. Guesses remaining: 4
Enter your guess: 25
Your guess is low. Guesses remaining: 3
Enter your guess: 50
Congratulations! That is correct!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
