26 lines
489 B
Text
26 lines
489 B
Text
function numdiv (n as integer) as integer
|
|
dim as integer c = 0, k
|
|
for k = 1 to n
|
|
if n mod k = 0 then c += 1
|
|
next k
|
|
return c
|
|
end function
|
|
|
|
function isTau (n as integer) as boolean
|
|
return (n mod numdiv(n) = 0)
|
|
end function
|
|
|
|
dim as integer c = 0, i = 1
|
|
|
|
printl "The first 100 tau numbers are:" cr
|
|
while c < 100
|
|
if isTau(i) then
|
|
print i, " ";
|
|
c += 1
|
|
if c mod 10 = 0 then printl
|
|
end if
|
|
i += 1
|
|
wend
|
|
|
|
printl cr "Enter ..."
|
|
waitkey
|