• admin@embedclogic.com

C- Program to find Armstrong number.

Program to find Armstrong number

Prerequisite:

  • Familiar with if-else statement
  • Familiar with while loop
  • Familiar with C-Operator

Armstrong number: A three digit number is an Armstrong number if the sum of cube of each digit equals to the number itself. e.g 

153= 1^3 +5^3 +3^3   (cube because total digit in number 3)

1634= 1^4 +6^4 +3^4 +4^4 (power 4 because total digit in number 4)

Program