Comp 170
Number List Statistics
20 Points
Write a C++ program that will:
- Allow
the user to enter a list of decimal numbers until a negative number is
entered.
- Allow
at most 1000 numbers to be entered.
- Save
all of the numbers entered into an array. (The negative number should not
be included in the list.)
- Sort
the list. Use any of the sorting
algorithms discussed in class. (Comment which algorithm you used.)
- Display
a count of the numbers that were entered.
- Display
a total of the numbers that were entered.
- Display
the smallest (least) number entered.
- Display
the largest (greatest) number entered.
- Display
the average number entered.
- Display
the median number entered.
- Display
the mode of the list. The mode is the number(s) that occurs the most frequently. If there is a tie display them all.