Histogram example -- explanation
Program scheme to print “histogram” of grades
// Read in a list of grades in the range 0..100, preceded
// by the number of grades, and
// print out how many times each grade appears
int n= in.readInt(); // number of grades
int[ ] f= new int [101]; // f[i] will be the no. of times grade i appears
// Initialize frequencies f[0..100] to 0.
// Read in the grades and make up array f.
// Print the grades and their frequencies (print only the grades in 0..10
// that appeared at least once in the input)