This is not the solution to this problem.
This is a pretty standard first-year homework assignment, so it's better to try to steer the OP in the right direction by asking him questions rather than...
Type: Posts; User: KevinWorkman
This is not the solution to this problem.
This is a pretty standard first-year homework assignment, so it's better to try to steer the OP in the right direction by asking him questions rather than...
What does that code do?
Can you write out, in words, what the pattern is?