Frobenius numbers: Difference between revisions
Content added Content deleted
(add RPL) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 1,717: | Line 1,717: | ||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
{{libheader|Wren-math}} |
{{libheader|Wren-math}} |
||
{{libheader|Wren-seq}} |
|||
{{libheader|Wren-fmt}} |
{{libheader|Wren-fmt}} |
||
<syntaxhighlight lang="ecmascript">import "/math" for Int |
<syntaxhighlight lang="ecmascript">import "./math" for Int |
||
import "/ |
import "./fmt" for Fmt |
||
import "/fmt" for Fmt |
|||
var primes = Int.primeSieve(101) |
var primes = Int.primeSieve(101) |
||
Line 1,731: | Line 1,729: | ||
} |
} |
||
System.print("Frobenius numbers under 10,000:") |
System.print("Frobenius numbers under 10,000:") |
||
Fmt.tprint("$,5d", frobenius, 9) |
|||
for (chunk in Lst.chunks(frobenius, 9)) Fmt.print("$,5d", chunk) |
|||
System.print("\n%(frobenius.count) such numbers found.")</syntaxhighlight> |
System.print("\n%(frobenius.count) such numbers found.")</syntaxhighlight> |
||