Doesn't anyone teach noobs how to format their code? INDENT! INDENT! INDENT!
No, the problem is your for loop simply tests the last digit 10 times. After testing the digit, you need to remove it so you can test the next to last digit.Originally Posted by Evandb
Then, consider what happens when you enter only 5 digits? What happens to your loop then?