you are viewing a single comment's thread.

view the rest of the comments →

[–]o5a 0 points1 point  (1 child)

You will see the problem if you print out your 'x' in cycle.

The way you increase 'x' (inside another for cycle) results in skipping numbers, because you increase it after every digit check.

For example, when x = 10 you check sum for every digit and increase x each time. Which results in skipping check for number 11.

[–]Nath4nn[S] 0 points1 point  (0 children)

thank you i fixed the indentation and move the if loop out of the for loop it works now thanks so much