Merge pull request 'added main.lua' (#1) from andreas/fizz-buzz:master into master

Reviewed-on: Digitalcyan/fizz-buzz#1
This commit is contained in:
andreas 2020-12-17 15:43:48 +01:00
commit d28b878303

14
main.lua Normal file
View File

@ -0,0 +1,14 @@
for i=1, 10, 1 do
local out = ""
if(i % 3 == 0) then
out = out .. "Fizz"
end
if(i % 5 == 0) then
out = out .. "Buzz"
end
if(out == "") then
io.write(tostring(i).."\n")
else
io.write(out.."\n")
end
end