One other thing about your coding style, indenting a statement does NOT make it be inside of the if statement's block. If you look at the printout from your code you will see a repeated printout....