Array-promo

Question

Check whether the given number is Armstrong number or not.

(A positive number is called Armstrong number if  sum of its own digits each raised to the power of the number of digits is equal to number)

				
					Enter a number
8208
8^4+2^4+0^4+8^4=4096+16+0+4096
8208 is an armstrong number

Enter a number
153
1^3+5^3+3^3=1+125+27=153
153 is an armstrong number
				
			

Share code with your friends

Share on whatsapp
Share on facebook
Share on twitter
Share on telegram

Code

Coding Store

Leave a Reply

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