Anonymous user
Proper divisors: Difference between revisions
→{{header|Lua}}: fixed spacing
(→{{header|Lua}}: fixed case for n < 2) |
(→{{header|Lua}}: fixed spacing) |
||
Line 1,333:
<lang Lua>-- Return a table of the proper divisors of n
function propDivs (n)
local divs, sqr = {1}, math.sqrt(n)
for d = 2, sqr do
|