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 and . For example, low = 1, and high =100, but you can choose your own range.

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!