Find Armstrong Number Java Program

Find Armstrong Number in Java using For Loop

Here, we have listed How To Check Armstrong Number Java Program. It is important that we should know How A For Loop Works before getting further with the Java Program Code.

What is an Armstrong Number?

If the Sum of Cubes of Individual Digits of an Integer is equivalent to the Integer, then it is an Armstrong Number. Armstrong Number is similar to a Narcissistic Number.

Example

153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 * 3)
407 = (4 * 4 * 4) + (0 * 0 * 0) + (7 * 7 * 7)
371 = (3 * 3 * 3) + (7 * 7 * 7) + (1 * 1 * 1)

Also Read: Java Program To Find Palindrome Numbers

Code To Check Armstrong Number in Java with For Loop


Also Read: Java Program To Print System Date and Time

Output

Find Armstrong Number in Java Programming Language

To know more about Armstrong Number, Refer Wikipedia. In case you get any Compilation Errors with this Code To Find Armstrong Number in Java or if you have any doubt about it, mention it in the Comment Section.


Tushar Soni

I am Tushar Soni, Co - Founder of CodingAlpha. I am a computer science student from India and passionate about Web Development and Programming. Connect with me on Facebook | LinkedIn | Google Plus

Join The Discussion