Check Armstrong Number of n digits in C – Programming Code Examples
C

Check Armstrong Number of n digits in C1 min read

An Armstrong Number is a number that when you raise each digit of the number to the power of the number of digits and then add them up you get the original number.

Output:




In this program, the number of digits of an integer is calculated first and stored in n. And, the pow() function is used to compute the power of individual digits in each iteration of the second for loop.

Leave a Comment