Factors of an integer: Difference between revisions

Factors of an integer en True BASIC
(Factors of an integer en BASIC256)
(Factors of an integer en True BASIC)
Line 1,102:
60
</pre>
 
 
==={{header|True BASIC}}===
{{trans|FreeBASIC}}
<lang qbasic>
sub printfactors(n)
if n < 1 then exit sub
print n; "=>";
for i = 1 to n / 2
if remainder(n, i) = 0 then print i;
next i
print n
end sub
 
call printfactors(11)
call printfactors(21)
call printfactors(32)
call printfactors(45)
call printfactors(67)
call printfactors(96)
print
end
</lang>
{{out}}
<pre>
Igual que la entrada de FreeBASIC.
</pre>
 
 
=={{header|Batch File}}==
2,130

edits