Question
In this assignment, youre going to write a C++ program to make a Guessing Integer game. At the beginning of the game, the player will
In this assignment, youre going to write a C++ program to make a Guessing Integer game. At the beginning of the game, the player will first enter (1) a minimum number (a positive integer, > 0), (2) a maximum number that is greater than the minimum and less than 1,000 (ONE THOUSAND), and (3) the number of guesses that the player can have and the number should be less than 10 (<10). Your program should validate the inputs are all in the right range. These three numbers cannot be changed after the game starts.
The program then will generate a random number between the minimum and the maximum (include both ends). The player can guess the number for several times (depending on the above input in (3)). While guessing the number, the game will give a hint to the player -- either the guess is too high or too low. If the player cant guess the number correctly within the allowed number of trials, the game will show the answer and ask if the player wants to play again. If the players guess the number successfully, the game will congratulate the player and ask if the player wants to continue.
Please use C++ style coding as we learned in the class. Also you should use functions (except the main function) as where it is appropriate. You may assume that only integers will be entered through the keyboard.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started