Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
20
Task/FizzBuzz/Lua/fizzbuzz-5.lua
Normal file
20
Task/FizzBuzz/Lua/fizzbuzz-5.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env luajit
|
||||
local to=arg[1] or tonumber(arg[1]) or 100
|
||||
local CF,CB=3,5
|
||||
local cf,cb=CF,CB
|
||||
for i=1,to do
|
||||
cf,cb=cf-1,cb-1
|
||||
if cf~=0 and cb~=0 then
|
||||
io.write(i)
|
||||
else
|
||||
if cf==0 then
|
||||
cf=CF
|
||||
io.write("Fizz")
|
||||
end
|
||||
if cb==0 then
|
||||
cb=CB
|
||||
io.write("Buzz")
|
||||
end
|
||||
end
|
||||
io.write(", ")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue