Amicable pairs: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add SETL) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 6,722: | Line 6,722: | ||
{{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 a = List.filled(20000, 0) |
var a = List.filled(20000, 0) |
||
Line 6,731: | Line 6,731: | ||
var m = a[n] |
var m = a[n] |
||
if (m > n && m < 20000 && n == a[m]) { |
if (m > n && m < 20000 && n == a[m]) { |
||
Fmt.print(" $5d and $5d", n, m) |
|||
} |
} |
||
}</syntaxhighlight> |
}</syntaxhighlight> |