Question: C++ Write a program that reads numbers from the user until the user enters a Sentinel. Use a Sentinel of -999. Ignore all negative numbers
Write a program that reads numbers from the user until the user enters a Sentinel. Use a Sentinel of -999. Ignore all negative numbers from the user input. Do the following 1. Output the sum of all even numbers 2. Output the sum of all odd numbers 3. Output the count of all even numbers 4. Output the count of all odd numbers You must use loops and numbers to do this. You must not use any arrays or vectors for this program. Grading Criteria: 1. All 4 parts work and I get good output. Code has comments and header. (10 points) 2. Only 3 parts work. Code has comments and header (8 points) 3. Only 2 parts work. Code has comments and header (7 points) 4. Only 1 part works. Code has comments and header (5 points) 5. No comments or program does not ignore negative numbers (-1 point each) 6. Program does not compile (3 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
