Well, we can't do your homework for you. Put your code in code tags so it is easier to read.

Since your assignment is to find the errors, there is only so much help one can give.
I will tell you...