Armstrong numbers

I think output should contain digits from 1 to 9 also.

Hey @connectrajanjain Can you please elaborate your doubt?

I mean to say numbers 1-9 are also armstrong numbers. they should also be part of the result.

Hey @connectrajanjain You are absolutely right but since here range is extended to 4 digits(1000) that is why we have to take power of 4 everytime. not 1 2 or 3 depending upon digits.
if the question was of just tell whether it is arm strong or not then we could have 2 3 or 4 as true;