Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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.) (You must use multiple functions in your source code to receive a grade for this assignment.) 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 positiveegative 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. Write the function determineEvenOrOdd() to determine if the integer value is even or odd and return a determination value to main(). Write the function determinePositiveOrNegative() to determine if the integer value is positive or negative and return a determination value to main Write the function displayResults() to display the number entered by the user and the determination of even or odd and positive or negative. c. d. e. Sample Input/Output: Please enter the number to be determined as even/odd or positiveegative: 25 The number you entered, 25 is a positive, odd value. Would you like to process another number? y Please enter the number to be determined as even/odd or positiveegative: -12 The number you entered, -12, is a negative, even value. Would you like to process another number? n
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