# LAB 4 - Guessing Game Solution

For this lab you will implement a guessing game. Your program will generate a random number in a certain range and will give the user a finite number of tries to guess what the number is. After the maximum number of tries, it will print whether the user won or lost. If they lost, print out the number and ask if they want to play again.Decisions you will make:The range for the random number
How many chances the user will have to guess
Make it an interesting game. If you give the user a range that is too big, it will be too difficult to guess. On the other hand, if the range is too small, it won't be challenging enough. Same with the number of chances. Make it a number that gives the user a chance to win, but is not too easy.Important requirements:Define constants for the number range and for the maximum number of tries allowed. You may define the constants global.
Define a function to welcome the user and explain how the game works. Give directions and let them know what the range is and the maximum number of tries.
Define a function to implement the logic of the game (one play). This function should be called in main.
In main, use a do-while loop to play as many times as the user wants. If the user wants to play again, you call the function that actually plays the game.
In the function that implements the game, you may use any kind of loop structure to control the number of tries. Keep in mind that you may have to exit early if the user wins.