Question: So with what I learned about a recursive function you can call another function to compute the average of an array of double values correct?

So with what I learned about a recursive function you can call another function to compute the average of an array of double values correct?

1.)C++ How to create a recursive function named averageArray that compute the average of an array of double values.

The average of {8.1, 9.9, 5.6, 7.8} is 7.85. 3.

2.) C++ Then how to write a recursive function named stdDevArray that compute the standard deviation of an array of double values. To compute standard deviation:

First-For each number in the array, subtract the average and then square the result.

Second-Sum the squared differences from step I and divide by the size.

Third-Take the square root of the result of step II.

So stdDevArray can call averageArray. stdDevArray can call another function that uses recursion to sum the squared differences.

The standard deviation of {8.1, 9.9, 5.6, 7.8} is 1.52725.

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 Databases Questions!