C Program to Check Armstrong Number

In this example, you will learn to check whether a number (entered by the user) is an Armstrong number or not. Before you solve this problem you need to know the logic behind an Armstrong number.

This program computes all Armstrong numbers in the range of 0 and 999. An Armstrong number is a number such that the sum of its digits raised to the third power is equal to the number itself. For example, 371 is an Armstrong number, since 3^3 + 7^3 + 1^3 = 371.