Program to print all Disarium numbers between 1 and 100ExplanationIn this program, we need to display all Disarium number between 1 and 100. Disarium number A number is said to be a Disarium number when the sum of its digit raised to the power of their respective position is equal to the number itself. For example, 175 is a Disarium number as follows Formula1^{1} + 7^{2} + 5^{3} = 1 + 49 + 125 = 175 Some of the other example of Disarium number are 89, 135, 518 etc. To find whether given number is Disarium or not, calculate the sum of digits powered with their respective positions. If the sum is equal to the original number then, the given number is Disarium number. Algorithm
SolutionPythonOutput: Disarium numbers between 1 and 100 are 1 2 3 4 5 6 7 8 9 89 COutput: Disarium numbers between 1 and 100 are 1 2 3 4 5 6 7 8 9 89 JAVAOutput: Disarium numbers between 1 and 100 are 1 2 3 4 5 6 7 8 9 89 C#Output: Disarium numbers between 1 and 100 are 1 2 3 4 5 6 7 8 9 89 PHPOutput: Disarium numbers between 1 and 100 are 1 2 3 4 5 6 7 8 9 89
Next Topic#
