Tau number: Difference between revisions

Tau number in Run BASIC
(Added Racket solution)
(Tau number in Run BASIC)
Line 431:
LOOP WHILE num < limit
END</syntaxhighlight>
 
==={{header|Run BASIC}}===
{{works with|Just BASIC}}
{{works with|Liberty BASIC}}
<syntaxhighlight lang="vb">print "The first 100 tau numbers are:"
 
n = 0
num = 0
limit = 100
while num < limit
n = n +1
tau = 0
for m = 1 to n
if n mod m = 0 then tau = tau +1
next m
if n mod tau = 0 then
num = num +1
if num mod 10 = 1 then print
print using("######", n);
end if
wend
end</syntaxhighlight>
 
==={{header|True BASIC}}===
2,130

edits