Java Program to Check Armstrong Number

Prem Tiwari - - Java Programming


This is simple Java program to check Armstrong number. When you execute this program, it asks to enter any number and then it will check whether entered number is Armstrong number or not. At the end of this tutorial, I have shared the execution output for two numbers one for Armstrong and another for the non-Armstrong number.

Java Program to check Armstrong Number

Copy the below program and execute it to check the Armstrong number.

Program Output

Enter a number to check if it is an armstrong number:
153
Entered number is an armstrong number.
Enter a number to check if it is an armstrong number:
5
Entered number is not an armstrong number.


About: Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.


Tags: , , , , , , , ,