Prime decomposition: Difference between revisions
m
→{{header|S-BASIC}}
Line 4,926:
=={{header|S-BASIC}}==
<lang S-BASIC>
rem -
function mod(p, q = integer) = integer
end = p - q * (p/q)
Line 4,935:
Find the prime factors of n and store in global array factors
(arrays cannot be passed as parameters) and return the number
found. If n is prime, it will be stored as the
end
function primefactors(n = integer) = integer
|