Abundant odd numbers: Difference between revisions
Content deleted Content added
m →{{header|Wren}}: Minor tidy |
|||
Line 6,691: | Line 6,691: | ||
{{libheader|Wren-fmt}} |
{{libheader|Wren-fmt}} |
||
{{libheader|Wren-math}} |
{{libheader|Wren-math}} |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./fmt" for Fmt |
||
import "/math" for Int, Nums |
import "./math" for Int, Nums |
||
var sumStr = Fn.new { |divs| divs.reduce("") { |acc, div| acc + "%(div) + " }[0...-3] } |
var sumStr = Fn.new { |divs| divs.reduce("") { |acc, div| acc + "%(div) + " }[0...-3] } |
||
Line 6,707: | Line 6,707: | ||
var s = sumStr.call(divs) |
var s = sumStr.call(divs) |
||
if (!printOne) { |
if (!printOne) { |
||
Fmt.print("$2d. $5d < $s = $d", count, n, s, tot) |
|||
} else { |
} else { |
||
Fmt.print("$d < $s = $d", n, s, tot) |
|||
} |
} |
||
} |
} |