OK, I've done that. Please let me have your teacher's contact details so I can email it directly to him, thus saving you the bother of copy/pasting the solution. You will, of course. fail the course, and maybe get chucked out, but that would be quite reasonable given your attitude.
DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules
James is right, Mabdullah. The rules on this forum are pretty clear and he's following them and you're violating them. He's been here quite a while, so one would assume he knows how things work here, especially when he linked the rule he was referring to.
And your program has a very serious error in it as well.