Armstrong Number

Submitted by admin on

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

Example : 14 + 64 + 34 + 44 = 1634.                 374


 To check armstrong number
java.io.*java.lang.Math.*"Enter a new number :"//gets number of digits
// going to process only > 0 
	{
		r = num%10; // returns first place number
//takes power of p digits to the number
		num = num/10;  //removes the first place number 
"It is Armstrong Number : ""It is Not Armstrong Number :" +temp);
	}
}