Question: C++ Help Needed Write a program that will determine if an integer between 10,000 and -10,000, entered by the user, is an even or an

C++ Help Needed

Write a program that will determine if an integer between 10,000 and -10,000, entered by the user, is an even or an odd value and also if it is a negative or positive value. (For simplicity reasons, zero is considered a positive, even value.)

I need to use multiple functions.

a. Use main( ) as the driver function. Allow the user to run the program as many times as desired.

b. Write the function getNumber ( ) that prompts the user for the whole number to be determined as even/odd or positive/negative and returns this value back to main( ). Do not allow the user to enter a value outside of the range specified. Display an error message and keep prompting until a valid value is entered.

c. Write the function determineEvenOrOdd( ) to determine if the integer value is even or odd and return a determination value to main( ).

d. Write the function determinePositiveOrNegative( ) to determine if the integer value is positive or negative and return a determination value to main( ).

e. Write the function displayResults( ) to display the number entered by the user and the determination of even or odd and positive or negative.

I am having a tough time with 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!