DEV Community

Discussion on: Daily Challenge #183 - Automorphic Numbers

Collapse
 
craigmc08 profile image
Craig McIlwrath

This doesn't work. For 11, (11² - 11) % 10 = (121 - 11) % 10 = 110 % 10 = 0. Your function would return true, but 11 is not automorphic.