Radical of an integer: Difference between revisions
Content added Content deleted
(Added Lua) |
m (→{{header|Lua}}: The null value is called nil in Lua) |
||
Line 1,125: | Line 1,125: | ||
for i = 1, maxNumber do |
for i = 1, maxNumber do |
||
local count = dpfc[ upfc[ i ] ] |
local count = dpfc[ upfc[ i ] ] |
||
dpfc[ upfc[ i ] ] = ( count == |
dpfc[ upfc[ i ] ] = ( count == nil and 1 or count + 1 ) |
||
end |
end |
||
io.write( "Distribution of radicals:\n" ) |
io.write( "Distribution of radicals:\n" ) |