Here is a program for you guys to play around with.
A somewhat disingeneous programming major thought he could use Perl to help him win the lottery. He created an array in which the index represented the lottery number and the value stored at that index represented the frequency of that number's occurence. He was doing this for the Texas Lottery where six numbers are chosen from 1 to 54 inclusive. He generated 10000 random numbers between 1 and 54 and stored the frequency distribution in his array. He then figured out how to sort the array in descending orderand displayed their frequencies in a simple table like this:
23 190,
31 189,
15 188,
3 187,
44 186,
8 185
The task is to write the source code to duplicate this output. Hint: imbedded FOR LOOPS