Gray code: Difference between revisions
Content deleted Content added
→{{header|Lua}}: Add output. |
m →{{header|Lua}}: improve formatter |
||
Line 996:
-- simple binary string formatter
local function to_bit_string(n, width)
local output = ""
while n > 0 do
Line 1,001 ⟶ 1,002:
n = bit.rshift(n,1)
end
output =
▲ if width then
end
return output
|