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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started