How I did my Homework Two:
I wrote a program:
here
.
You can read the source code
here
.
In general you need to post two links per program (one to show the code).