Introduction
- In this blog, I am going to explain Armstrong number. It is nothing but "An Armstrong number of the three digits is an integer, such that the sum of the cubes of its digits is equal to the number itself ".
Software Requirement
- Turbo C++ OR C.
Programming
- #include < stdio.h >
- #include < stdlib.h > int main()
- {
- int a, n, b = 0, t;
- printf("Enter the no:");
- scanf("%d", & n);
- t = n;
- while (n > 0)
- {
- a = n % 10;
- b = b + a * a * a;
- n = n / 10;
- }
- if (b == t)
- {
- printf("its an armstrong number");
- } else
- {
- printf("its not an armstrong number");
- }
- getch();
- return 0;
- }
Explanation
- In the programming, given above, it is clearly understood that Armstrong number is a number which is equal to the sum of the digits, raised to the power and the total number of the digits in the number.

Output


Conclusion
- Thus the Armstrong number is clearly explained and executed successfully.

Parvez AhadPosted Jul 14, 2016, 5:02 AM
Good
kalu singh raoPosted Jul 13, 2016, 3:56 AM
Nice...
Vignesh ManiPosted Jul 13, 2016, 3:29 AM
Good One