Homework E4

Due dates

This assignment must be submitted to the Moodle submission page for Homework E4 by 11:00 PM on Tuesday, 20 September. And, yes, that is the day before the first exam. This homework will be good preparation for the exam.

The assignment

In this assignment you will ask the user to enter ten integers. Your program will compute the average of those ten integers. Then your program will compute the average of the numbers that are greater than the average.

Suppose the numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 are entered, The average of those ten number is 5.5. There are five numbers, 6, 7, 8, 9, and 10 greater than 5.5. The average of those five is 8.0.

You really must use an array for this problem.

If an improper character is entered before the tenth integer or if an integer out of the range of 32-bit numbers is entered or if ten identical integers are entered, your program is allowed to crash and burn.

An example

ECE 209 Homework E4
J Dean Brock

Enter ten integers
209 1492     2011   -20000 33
   0  

13 17 19 23
The average of the 10 numbers is -1618.30
The average of the 9 numbers greater than -1618.30 is 424.11