CPSC 170 Post Lab 0: Grade Histogram

Due Tuesday, Jan 22

Write a program that reads grades from the user and prints a histogram showing how many grades are in each decile (0-9, 10-19, 20-29,..., 90-99, and 100). Ask the user to enter the grades, entering -1 when there are no more. If the user enters a grade that is not in the -1..100 range, print a message saying that it is out of range and ask for another value. When all of the grades have been entered, print the histogram with one star for each grade in each decile. For example, if the user entered the grades 92, 17, 5, 85, 100, 90, 75, 77, 98, 40, 88, 81, and 85, the output would look something like this:
0..9:   *
10..19: *
20..29: 
30..39: 
40..49: *
50..59: 
60..69: 
70..79: **
80..89: ****
90..99: ***
100:    *
The user should be able to enter any number of scores (although at some point the number of stars won't fit on a line, but we won't worry about that). Note that you don't need to store the scores themselves!

Remember to document your program. Turn in hardcopy at the beginning of class, and tar up your postlab0 directory and e-mail it to bloss@cs.roanoke.edu.