Hwever as an example if the main function were int main


C plus plus program, and i use cin and cout, In this problem you will write a C++ function which takes an array of doubles and its length as parammeters and returns its standard deviation (also a double). Write a function which has this EXACT signature (including the name): double stddev(double arg[], int length), Notice that the length of the array is passed in as the second argument. This is necessary because when an array is passed as as a parameter, the function really just receives the memory address of the first argument (which also means that arrays are implicitly passed by reference). All of this will be explained in more detail during recitation. Submit only your function definition (no main() function) below! Assume that you have the cmath library at your disposal. You should write a main function which calls your function (ideally with a few cases) for testing and debugging your function, however. As an example, if the main() function were: int main() { double x[] = {2,4,4,4,5,5,7,-9}; cout << "S.D.: " << stddev(x,8) << endl; } The output would be:S.D.: 4.63006, i will rate lifesaver 5 stars.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Hwever as an example if the main function were int main
Reference No:- TGS0646773

Expected delivery within 24 Hours