Answered step by step
Verified Expert Solution
Question
1 Approved Answer
c++ functions Write a program that will randomly generate an integer between the numbers 1 and 100, inclusively, and then prompt the user to guess
c++ functions
Write a program that will randomly generate an integer between the numbers 1 and 100, inclusively, and then prompt the user to guess the number. Refer to the tutorial for this lab for help generating a random number. The program should continue until the user guesses correctly. Include the following functions in your program. int generateSeeretNumber ) This function should generate and return a random integer between 1 and 100, inclusively. int getUserGuess This function should prompt the user to enter his/her guess. Be sure to include the range in the prompt. Input should be validated. Once validated, the user's guess should be returned bool correctGuess (int secretNumber, int guess) This function should determine if the guess is indeed the secret number. if the guess is the secret number, the function should return true, otherwise it should return false. void guessingGame 0 This function should perform any necessary actions to start the game, run the game and complete the game. main) include the following code in function main() to execute the guessing game: Code lHustration guessingGame) returnStep 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