#include #include #include float find_avg(int [], int); // function prototype float std_dev(int [], int, float); // function prototype int main() { const int NUMELS = 10; int values[NUMELS] = {98, 82, 67, 54, 78, 83, 95, 76, 68, 63}; float average, stddev; average = findAvg(values, NUMELS); // call the function stddev = stdDev(values, NUMELS, average); // call the function cout << "The average of the numbers is " << setw(5) << setiosflags(ios::showpoint) << setprecision(2) << average << endl; cout << "The standard deviation of the numbers is " << setw(5) << setiosflags(ios::showpoint) << setprecision(2) << stddev << endl; return 0; } float findAvg(int nums[], int numel) { int i; float sumnums = 0.0; for (i = 0; i < numel; i++) // calculate the sum of the grades sumnums = sumnums + nums[i]; return (sumnums / numel); // calculate and return the average } float stdDev(int nums[], int numel, float av) { int i; float sumdevs = 0.0; for (i = 0; i < numel; i++) sumdevs = sumdevs + pow((nums[i] - av),2); return(sqrt(sumdevs/numel)); }