Question

Check whether a number is a Disarium number using recursion.

(A number is said to be the Disarium number when the sum of its digit raised to the power of their respective positions is equal to the number itself.)

11 + 72 + 53 = 1 + 49 + 125 = 175

				
					ENTER THE NUMBER
175
175 IS A DISARIUM 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 *