Question
You will write the following functions. Write a function in C++ named introduction that returns nothing and takes two integer parameters named low and high.
You will write the following functions.
Write a function in C++ named introduction that returns nothing and takes two integer parameters named low and high. This function then prints a welcome message as Hello User! I am thinking a number between
Write a function named getGuess that asks the user to guess a number between low and high. The function returns an integer, and takes no parameters.
Write a function named testGuess that tests the number guessed above. If the guessed number is less than the randomly generated number, the functions prints Your guess is lower than the randomly generated number. If the guessed number is greater than the randomly generated number, the functions prints Your guess is higher than the randomly generated number. If both numbers are equal, the function prints a congratulatory message Congratulations! You won.
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