What specifically don't you understand?

For a start, what is your code doing? Is there any compiler or runtime errors? If so, please post the message. What outputs are you getting, and what inputs...