Did you even try to do it yourself? I'm not against borrowing code to get the job done, but this is clearly homework, and homework is meant to be solved so that you can learn to be a better programmer.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004