MAKE SURE IT DISPLAYS THE LARGEST VALUE AND THAT THE RANGE IS INCLUDED AS WELL AS 5 NUMBERS BEING POSITIVE, 4 NEGATIVE, AND ONE IS ZERO.       Write a short computer program in C++ that will read 10 integer numbers entered from a keyboard and then print the smallest number, the largest number, and the average value.  Assume all numbers are in the range [-500 … +500].  Execute the program, entering 10 values scattered across the above range, with 5 non-zero positive numbers, 4 negative numbers, and one zero. It is NOT required that that the program check for invalid entries - you may assume that appropriate values are entered correctly. Submit the source program listing and the results. Example:         30  -25  18  -3  10   0  100  -100  200 -200                               Smallest = -200  Largest = 200 Average = 3

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.3: Nested If Statements
Problem 7E
icon
Related questions
Question

MAKE SURE IT DISPLAYS THE LARGEST VALUE AND THAT THE RANGE IS INCLUDED AS WELL AS 5 NUMBERS BEING POSITIVE, 4 NEGATIVE, AND ONE IS ZERO.

 

 

 

Write a short computer program in C++ that will read 10 integer numbers entered from a keyboard and then print the smallest number, the largest number, and the average value.  Assume all numbers are in the range [-500 … +500].  Execute the program, entering 10 values scattered across the above range, with 5 non-zero positive numbers, 4 negative numbers, and one zero.

It is NOT required that that the program check for invalid entries - you may assume that appropriate values are entered correctly.

Submit the source program listing and the results.

Example:         30  -25  18  -3  10   0  100  -100  200 -200

                              Smallest = -200  Largest = 200 Average = 3

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,