Question: Write a program to prompt the user for eight (8) float values, and store the data in the float array a[] in the main()

Write a program to prompt the user for eight (8) float values, and store the data in the float array a[] in the main() function. The program will calculate the average using the average() function, which accepts the relevant input parameters, and outputs the result to the terminal screen. Example, Enter 8 float values: 1 2 3 4 5 6 7 8 Average = 4.50 Enter 8 float values: 4.6 5.3 1.7 8.3 2.2 5.5 6.2 4.7 Average 4.81
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
