PPT Slide
// 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[k] to 0.