Purchase Solution

C++ program to compute mean and standard deviation

Not what you're looking for?

Ask Custom Question

Design and write a C++ program that reads a set of scores from the file scores.dat and outputs their mean and standard deviation on standard output. Use the following sets of input for testing the program.

Data: 56, 35, 87, 18, -34, 46, 0
Data: 82, 23, 52, 83, 91, 48, 72, 78, 74, 0

Please note that 0 is a sentinel value (indicating the end of numbers input), so it should not be used in computations.

Purchase this Solution

Solution Summary

Attached is program computes population standard deviation, however it is mentioned in the comments in the code as to what little change you can make to compute sample standard deviation instead. Program has been designed to take the input file name as command line argument.

Solution Preview

Please find an implementation attached as 369339.cpp . It computes population standard deviation, however it is mentioned in the comments in the code as to what little change you can make to compute sample standard deviation instead.

While putting the data in input file, ...

Purchase this Solution


Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.