The values returned from calcavg and variance should be


Write, compile, and run a C++ program that includes two functions named calcavg() and variance(). The calcavg() function should calculate and return the average of values stored in an array named testvals. The array should be declared in main() and include the values 89, 95, 72, 83, 99, 54, 86, 75, 92, 73, 79, 75, 82, and 73. The variance() function should calculate and return the variance of the data. 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. The values returned from calcavg() and variance() should be displayed by using cout statements in main().

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: The values returned from calcavg and variance should be
Reference No:- TGS02192182

Expected delivery within 24 Hours