Full question:
Write a program that inputs 10 integers into an array. Calculate and output the average of the 10 integers entered and a count of how many input values are greater than the average. You are also required to print the numbers from the array all on the same line.
If given the same inputs as shown in the example run below, your program should produce the same output
The user's input data is shown in boldface.
Please enter a number: 89
Please enter a number: 56
Please enter a number: 12
Please enter a number: 22
Please enter a number: 23
Please enter a number: 92
Please enter a number: 55
Please enter a number: 18
Please enter a number: 29
Please enter a number: 63
Numbers from array: 89 56 12 22 23 92 55 18 29 63
Average of the numbers entered : 45.9
Number of input values greater than the average : 5
Note : You must use FOR loop(s) for ALL array handling.
2007-03-12
05:07:48
·
2 answers
·
asked by
Facilitate
1
in
Computers & Internet
➔ Programming & Design