Minimum multiple of m where digital sum equals m: Difference between revisions
Content added Content deleted
(Added Easylang) |
|||
Line 582: | Line 582: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
{{trans|AWK}} |
|||
<syntaxhighlight> |
<syntaxhighlight> |
||
fastfunc |
fastfunc f n . |
||
m = 1 |
|||
repeat |
|||
⚫ | |||
h = m * n |
|||
⚫ | |||
while h > 0 |
|||
⚫ | |||
h = h div 10 |
|||
⚫ | |||
until sum = n |
|||
m += 1 |
|||
. |
. |
||
return |
return m |
||
. |
. |
||
for n = 1 to 70 |
for n = 1 to 70 |
||
write f n & " " |
|||
while digsum (m * n) <> n |
|||
⚫ | |||
⚫ | |||
write m & " " |
|||
. |
. |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|F_Sharp|F#}}== |
=={{header|F_Sharp|F#}}== |