Jump to content

Factors of an integer: Difference between revisions

m
m (Reordering BASIC dialects)
m (→‎{{header|Wren}}: Minor tidy)
Line 7,047:
{{libheader|Wren-fmt}}
{{libheader|Wren-math}}
<syntaxhighlight lang="ecmascriptwren">import "./fmt" for Fmt
import "./math" for Int
 
var a = [11, 21, 32, 45, 67, 96, 159, 723, 1024, 5673, 12345, 32767, 123459, 999997]
System.print("The factors of the following numbers are:")
for (e in a) SystemFmt.print("%(Fmt.d(6$6d => $n", e)), => %(Int.divisors(e))")</syntaxhighlight>
{{out}}
<pre>
9,482

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.