Explore BrainMass
Share

C++ program to compute mean and standard deviation

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Design and write a c++ program that reads a set of scores from attached "numbers.txt" and outputs their mean and standard deviation using cout.

© BrainMass Inc. brainmass.com March 21, 2019, 8:33 pm ad1c9bdddf
https://brainmass.com/computer-science/cpp/c-program-compute-mean-standard-deviation-339454

Attachments

Solution Preview

Please see the program below. Note that the file "numbers.txt" should be placed in the same directory as the compiled program.

int main(void)
{
ifstream input;
int number,num;
double sum,sum_of_squares,avg;

// Open the file containing the numbers.
input.open("numbers.txt");

// Read the numbers from ...

Solution Summary

The epert designs and writes a c++ program to compute the mean and standard deviation.

$2.19