High Low Game


Goal:

Use if and else if statements in a loop until the user correctly guesses the secret number in a high low game.

Steps:

  1. Get a random number between 1 and 100. Hint: use a Random object
  2. Ask the user to guess what the number is.
  3. If their guess is correct, tell them they won and end the game.
  4. If their guess is too high, tell them it is too high.
  5. If their guess is too low, tell them it is too low.
  6. Use a for loop to repeat the above code 10 times. If they don't find the number after 10 tries, tell them they lost the game and tell them the number.