Array-promo

Question

Print Armstrong number in an (Array for Java/ List for Python)

				
					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
153
1^3+5^3+3^3=1+125+27=153
153 is an armstrong number
				
			
				
					Enter the size of list:10
enter element in given list:
1:30
2:20
3:1
4:153
5:99
6:107
7:19
8:145
9:131
10:3
Elements in given List:
[30, 20, 1, 153, 99, 107, 19, 145, 131, 3]
Armstrong number in given List:
1 153 3 
				
			

Share code with your friends

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

Code

Coding Store

10-minute Stress-Buster Games

Leave a Reply

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