CSCI 297 Assignment A
Mean and Standard Deviation
In statistics, we often have a collection of numbers, and there are various calculations we can make, including the mean and the standard deviation.
In this assignment, we have a file containing several lists of numbers, and we will investigate each list of numbers.
You may find that a good way to start on this is to read the algorithm and figure out what parts repeat, that is, what loops are needed. Decide what variables you need.
To calculate the statistics we want will require a loop. We will have several lists of numbers, so we will need another loop as well.
The actual calculation is described here.
What does the data look like?
Each line of data contains one integer.
Copy the data file into your directory. You can find it here.
The lines are actually organized into groups. Each group is a list of numbers, followed by a line containing the value -555.00. Here -555.00 is a delimiter marking the end of the group. Do not include -555.00 in the calculations.
At the end of the whole file is a line containing -444.00. It is a delimiter indicating the end of the file.
There are also other ways to find the end of the file.
Steps:
PRINT *
PRINT *
between groups of input values.
progA < dataA.txt > outputA.txt
The program will read its input from dataA.txt and write its output to outputA.txt.