Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions