How to check Armstrong number java program

By | August 10, 2018

In previous post  How to reverse a number in Java  we learnt how to reverse a positive or negative numbers in java
In this post  we will write a java program to check  Whether number is armstrong or not.

What is Armstrong  number?

An n-digit number that is the sum of the nth powers of its digits is called an Armstrong number. 

In another words we can define Armstrong number as below:

We can define an  Armstrong number is a number that is equal to the sum of the digits in a number raised to the power of number of digits in the number.

I have tested  above program for few inputs as below. You may check for other input as well .

That’s all about  this topic How to check Armstrong number java program
If you have any feedback or suggestion please feel free to drop in blow comment box. 


Leave a Reply

Your email address will not be published. Required fields are marked *