Microsoft Small Basic

Program Listing: HiLow
'Choose a random number between 1 and 100

'Do the following 8 times

' Ask the user for a guess.

' If the guess is correct

' Play a bell

' Tell the user that they won the game and exit

' Otherwise, if the guess is too high

' Tell the end user that it is too high

' Otherwise, if the guess is too low

' Tell the end user that it is too low

'Repeat

'If after 8 times they haven't guessed correctly then

' Tell them they've lost the game