Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

What change in break even analysis if fixed cost never changes

Answered: 1 week ago