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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started