Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions