A frequency counter is possibly one of the coolest ways to use an array, and no switch statement is required.

For a random number generator that generates numbers 0 - n
Create an array to count...