Have you tried stepping through your code line by line? Add a few println statements to see how your program is modifying the variables, or better yet if you know how, use a debugger.

hint: Take a...