Factors of an integer: Difference between revisions

Factors of an integer en BASIC256
(Factors of an integer en BASIC256)
Line 1,011:
16383 , 32766
</pre>
 
 
==={{header|BASIC256}}===
{{trans|FreeBASIC}}
<lang BASIC256>
subroutine printFactors(n)
print n; " => ";
for i = 1 to n / 2
if n mod i = 0 then print i; " ";
next i
print n
end subroutine
 
call printFactors(11)
call printFactors(21)
call printFactors(32)
call printFactors(45)
call printFactors(67)
call printFactors(96)
end
</lang>
{{out}}
<pre>
Igual que la entrada de FreeBASIC.
</pre
 
 
==={{header|GW-BASIC}}===
2,169

edits