Sum of the digits of n is substring of n: Difference between revisions

Added Easylang
(Add Refal)
(Added Easylang)
 
Line 920:
109 119 129 139 149 159 169 179 189 199 200 300 400 500 600 700 800 900 910 911
912 913 914 915 916 917 918 919</pre>
 
=={{header|EasyLang}}==
<syntaxhighlight>
fastfunc digsum h .
while h > 0
sum += h mod 10
h = h div 10
.
return sum
.
for i = 0 to 999
h = digsum i
if strpos i h <> 0
write i & " "
.
.
</syntaxhighlight>
{{out}}
<pre>
0 1 2 3 4 5 6 7 8 9 10 20 30 40 50 60 70 80 90 100 109 119 129 139 149 159 169 179 189 199 200 300 400 500 600 700 800 900 910 911 912 913 914 915 916 917 918 919
</pre>
 
=={{header|F_Sharp|F#}}==
2,083

edits