Based on web, giving right Armstrong numbers. Following advice on this page, zero is excluded. Don't know what's wrong!! Addendum: With some modifications to the code below I have tried: 1. excluding 0, numbers < N 2. excluding 0, numbers <= N 3. including 0, numbers < N 4. including 0, numbers <= N None pass.