Question: Im struggling. 1. Write a complete C++ program that reads data into an integer array named tastals (size will be determined from input). The program

Im struggling.
 Im struggling. 1. Write a complete C++ program that reads data

1. Write a complete C++ program that reads data into an integer array named tastals (size will be determined from input). The program includes two functions named alsaxa)and calc_variance ). The sals.aua function calculates and returns the average of the values stored in array tastxals Function calc_variance on the other hand, calculates and returns the variance of the data. The formula to calculate variance is given in TABLE Q2 The values returned from salsaxa and calc_variance should be displayed using the cout. statements in main TABLE Q2 Variance = ( xi - x,vg )2 / N Wherei -summation x, = Each value in testvals Avg= Average N-The number of elements in testvals Note: The variance is obtained by subtracting the average from each value in testvals, squaring the values obtained, adding them, and dividing by the number of elements in testvals.]

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!