Question: a ) Write a function called readArray ( ) that will accept a double array of size 1 0 0 as its only parameter and

a) Write a function called readArray() that will accept a double array of size 100 as its only parameter and will prompt for and read in 100 values into the array.
b) Write a function called avg() that will accept a double array of size 100 as its only parameter and will calculate and return the average of the 100 numbers stored in the array.
c) Write a function called var() that will accept two parameters a double array of size 100 and a
double value, the average of the array values. It will then calculate and return the variance of the values stored in the array. Here is a description of how to calculate the variance: If we denote the array values as x1,x2,,x10, and denote the array value average as x, then
thevariance=(x1-x)2+(x2-x)2++(x100-x)2100.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!