Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered Note. Only use the while loop, not the do-while or for loops. Add the following to your program:

  • A counter within the while loop that keeps track of the number of inputs entered
  • A comment that determines if the total value is less than 100 or greater than 100, as in the sample output
  • Switch statements to determine the total number of inputs

Refer to the following sample output as an example: Enter numbers, one per line. Enter 0 to end:

7
8
6
5
9
8
0

Thank you. The total was 48.

The total number of inputs read: 8
The total is less than 100
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.