Largest proper divisor of n: Difference between revisions
Added Run BASIC
m (→J: simpler & slightly faster) |
(Added Run BASIC) |
||
Line 827:
220 IF j >= 10 THEN PRINT " "; j;
230 GOTO 160</syntaxhighlight>
==={{header|Run BASIC}}===
<syntaxhighlight lang="vbnet">print "Largest proper divisor of n is:"
print chr$(10)+" 1 1";
for i = 3 to 100
for j = i-1 to 1 step -1
if i mod j = 0 then print using("###",j); : goto [exit]
next j
[exit]
if i mod 10 = 0 then print
next i
end</syntaxhighlight>
==={{Header|Tiny BASIC}}===
|