Question: Write the following program in C++: Requirements: 1. Use a while loop to read from cin 10 integers(10 integers which include negative number) 2. If

Write the following program in C++: Requirements: 1. Use a while loop to read from cin 10 integers(10 integers which include negative number) 2. If the input number is negative, use the continue statement to skip to the bottom of the loop(do not sum the negative number) 3. Sum the positive numbers, consider 0 to be positive 4. After the loop terminates, print the sum of the positive integers.

(Please keep in mind we have only covered basic C++ concepts, conditionals, and loops).

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!