Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a C++ program that takes ten whole numbers as input , and that outputs the sum of all the numbers greater than zero ,
Write a C++ program that takes ten whole numbers as input, and that outputs the sum of all the numbers greater than
zero, the sum of all the numbers less than zero, and the sum of all the numbers, whether positive, negative, or zero.
Requirements:
- The user enters the ten numbers just once each and the user can enter them in any order.
- For example:
- Input 10 Whole Numbers : 1 5 2 6 7 10 7 3 4 8
- For example:
- Your program should not ask the user to enter the positive numbers and the negative numbers separately.
- Use appropriate data type for each variable.
- State your name in a comment line.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started