CSC121S2021Lab4

From BU Computer Science
Jump to navigation Jump to search

Lab 4 for CSC 121

Overview

For this lab you are to write a program that assigns a letter grade to an exam passed on the statistics for the entire class. The details are below

Details for computing

ST stands for standard deviation. ME is the mean
An A is any grade that is > ME + 1.5*ST
A B is any grade that is > ME + 0.5*ST and <= ME + 1.5*ST
A C is any grade that is > ME - 0.5*ST and <= ME +0.5*ST
A D is any grade that is > ME -1.5*ST and <= ME - 0.5*ST
An F is any grade that is <= ME-1.5*ST

Details for the program

You are to get a series of numbers (floating point) from the user for a class (terminated by a -99). For each grade, print out the letter grade associated with that value based on the above formulas.

For those that want a challenge and have successfully completed the above

Figure out how to read the grades from a file using the end of file to signal the end of the data. This is to be done on your own without help from any other person -> you can use the textbook only.