Question: For this assignment you are to implement a program that processes a sequence of values input by a user, and generates and outputs the following
For this assignment you are to implement a program that processes a sequence of values input by a user, and generates and outputs the following results: The sum of the input values The sum of the even numbers input The sum of the odd number input The sum of the numbers that are neither even or odd The average of all of the input values The program should begin by prompting the user to input a value. This value can be any real number. Once this value has been processed, the program should then ask the user if there is another value to be processed. Each time the the user responds in the affirmative, by inputting Y or y, the program should prompt the user to input another value, process that value, and then ask again if there is another value to process. Once the user responds in the negative by inputting a value other than Y or y, the program should output the generated results (as listed above) and terminate. Your assignment submission should include two document: one a text-based file (e.g., .cpp extension) that contains a copy of your code, and the other a copy of the output generated by your program using the data that I supply. On the following page is a copy of the output generated by my implementation of the assignment using the following data values: 10, 1.2, 7.0, 3.8, 20.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
