Review Lab

 

Welcome back to C++.  Since this is the first day of class, we will spend the hour in lab re-acquainting ourselves with Visual Studio and the C++ syntax.  Start programming the following program.  Take your time, be intent on reviewing and reminding yourselves of the concepts that you learned in CSC126, and do NOT be concerned about finishing this assignment.

 

1.  (Programming Exercise 10, Chapter 6)  Write a program that inputs five numbers and outputs the mean (average), and standard deviation of the numbers.  If the numbers are  x1, x2, x3, x4, and x5, then the mean is: x = (x1 + x2 + x3 + x4 +  x5) / 5

and the standard deviation is (note that the x in the formula below is the average of the numbers, as computed above):

s =

 

2. (Programming Exercise 10, Chapter 9) Extend the program above so that it works on a file of numbers, where there is one number on each line.  The maximum # of lines in the file is 100.