Question: Write the necessary program in C++ that does the following: 1. Declares a whole number type constant value space called MAX_NUMBERS and Stores the value

Write the necessary program in C++ that does the following: 1. Declares a whole number type constant value space called MAX_NUMBERS and Stores the value of 10 2. Declares a space called userInput to store user entered value 3. Declares a space called evenValueTotal 4. Declares a space called oddValueTotal 5. Using a while repetition structure that runs MAX_NUMBERS number of times, a) Asks (prompts) the user to input a whole number by using the prompt Enter a whole number: on the screen, and after user entered the input, c) Reads the users input value from the keyboard and Stores it at the userInput location d) Finds whether the value inputted is even or odd and accordingly add to either evenValueTotal or odd ValueTotal 6. Displays the separately the TWO total values calculated: total of all the even values, and total of all the odd values among the entered inputted values.

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!