Question: Revise the High-Low Game solution so that at the end of the game it displays an additional message telling the user how many guesses he

Revise the High-Low Game solution so that at the end of the game it displays an additional message telling the user how many guesses he or she made. As a result, the program output on pages 11-13 of this document would have an additional output dialog box after the You guessed the secret number dialog box.

High-Low Game VBA Code:

Sub HigherLowerGame()

Dim secret As Integer

Dim guess As Integer

secret = WorksheetFunction.RandBetween(1, 1000)

Do

guess = InputBox("Please enter your guess")

If secret > guess Then

MsgBox "Higher"

ElseIf secret < guess Then

MsgBox "Lower"

Else

MsgBox "You guessed the secret number"

End If

Loop While guess <> secret

End Sub

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!