Factors of an integer: Difference between revisions

Content added Content deleted
(add gw basic)
No edit summary
Line 864: Line 864:


=={{header|Arturo}}==
=={{header|Arturo}}==
<lang rebol>factors: $[num][
select 1..num [x][
(num%x)=0
]
]


print factors 36</lang>
<lang arturo>factors: @(num) -> filter 1..36 -> num%&=0
{{out}}


<pre>1 2 3 4 6 9 12 18 36</pre>
print [factors 36]</lang>

{{out}}


<pre>#(1 2 3 4 6 9 12 18 36)</pre>


=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==