Disarium numbers: Difference between revisions

no edit summary
imported>Chinhouse
No edit summary
Line 2,025:
</pre>
 
=={{header|MiniScript}}==
<syntaxhighlight lang="miniscript">
isDisarium = function(n)
num = n
sum = 0
if num == 0 then return true
for i in range(ceil(log(n)), 1)
sum += (n % 10) ^ i
n = floor(n / 10)
end for
return num == sum
end function
 
foundCnt = 0
cnt = 0
while foundCnt < 19
if isDisarium(cnt) then
foundCnt += 1
print cnt
end if
cnt +=1
end while</syntaxhighlight>
{{out}}
<pre>
0
1
2
3
4
5
6
7
8
9
89
135
175
518
598
1306
1676
2427
2646798
</pre>
 
=={{header|Miranda}}==
Anonymous user