Question: In C language This program below calculates the mean and the standard deviation of an array of integers. Your program should behave as shown in

In C language

This program below calculates the mean and the standard deviation of an array of integers. Your program should behave as shown in the following example:

Enter the array size: 5 Enter the numbers: 600 470 170 430 300 The mean is 394.00 and the standard deviation is 147.32 

Your job is to implement the four functions listed below. You are not allowed to modify anything else.

The following code is downloadable below under Submission Instructions.

#include

#include

int getInt(char prompt[]);

void getData(char prompt[], int array[], int size);

void calcMeanStdDev(int array[], int size, double *pMean, double *pStdDev);

void printResults(double mean, double stdDev);

int main(void) {

int size = getInt("Enter the array size: ");

int array[size];

getData("Enter the numbers: ", array, size);

double mean, stdDev;

calcMeanStdDev(array, size, &mean, &stdDev);

printResults(mean, stdDev);

return 0;

}

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!