Number Guessing Game

Description

This is a number-guessing game. The player is prompted to guess a number between 1 and 100.

  • If the player guesses the same number more than once, the program informs the player that he or she has already guessed that number and does not count the guess toward the five-guess limit.
  • If the player guesses a number that is less than 1 or greater than 100, the program informs the player that the guess is invalid and does not count the guess toward the five-guess limit.
  • After five incorrect guesses, the program tells the player that he or she has lost the game and asks the player whether he or she would like to play again.
  • If the player guesses the correct number, the program congratulates the player and exits.