Program to find whether a number is Armstrong or not

Definition (Armstrong Number): An n-digit number equal to the sum of the nth powers of its digits.
Example:
153 = 13 + 53 + 33
1634 = 14 + 64 + 34 + 44

Output:

Enter the number: 92727

92727 is an armstrong number

Have any questions regarding this program? Post a comment.

You may also like...

4 Responses

  1. Sam says:

    Nice share

  2. it can be also written simpler than this. without using and so confusion don’t arrives.

  3. Anonymous says:

    Can u plz tell us different math.h functions you have used.??

  1. March 2, 2014

    […] Program to find whether a number is Armstrong or not […]

Leave a Reply

Your email address will not be published. Required fields are marked *