Disarium numbers: Difference between revisions

Content added Content deleted
(Added 11l)
Line 30: Line 30:
<br>
<br>



=={{header|11l}}==
{{trans|Python}}

<syntaxhighlight lang="11l">
F is_disarium(n)
V digitos = String(n).len
V suma = 0
V x = n
L x != 0
suma += (x % 10) ^ digitos
digitos--
x I/= 10
I suma == n
R 1B
E
R 0B

V limite = 19
V cont = 0
V n = 0
print(‘The first ’limite‘ Disarium numbers are:’)
L cont < limite
I is_disarium(n)
print(n, end' ‘ ’)
cont++
n++
</syntaxhighlight>

{{out}}
<pre>
The first 19 Disarium numbers are:
0 1 2 3 4 5 6 7 8 9 89 135 175 518 598 1306 1676 2427 2646798
</pre>


=={{header|Action!}}==
=={{header|Action!}}==