Question: Exercise 6 . 3 Define a function and prototype called getFirstNumber ( ) . This function takes no parameters and returns an integer. The function

Exercise 6.3 Define a function and prototype called getFirstNumber(). This
function takes no parameters and returns an integer. The function should prompt a
user for a number between 1 and 10. Use a loop to validate the inputs value. If the
value is invalid, continue to prompt until a valid value is received. When a valid value
is given, it should be returned from the function
Define a function and prototype called getSecondNumber(). This function takes one
integer parameter and returns an integer. The parameter is a lower bound for a
number. The function should prompt a user for a number between the lower bound
and 15. Use a loop to validate the inputs value. If the value is invalid, continue
to prompt until a valid value is received. When a valid value is given, it should be
returned from the function
Define a function and prototype called printRange. This function takes two integer
parameters, the lower and upper bound) and returns void. The function should use
to print all the numbers form the lower to upper bound.
Write a main program that calls the getFirstNumber function and uses the result as
input to the getSecondNumber function. These will be the lower and upper bound for
calling printRange, call print range with this input
The goal of this exercise is to practice various loop patterns and practice using functions

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!