lunar_wave/test_vectors/fizz_buzz.lua

12 lines
191 B
Lua
Raw Normal View History

for i = 1, 50 do
2023-09-27 03:45:41 +00:00
if i % 3 == 0 and i % 5 == 0 then
2023-09-27 18:58:37 +00:00
print (i, "FizzBuzz")
2023-09-27 03:45:41 +00:00
elseif i % 3 == 0 then
2023-09-27 18:58:37 +00:00
print (i, "Fizz")
2023-09-27 03:45:41 +00:00
elseif i % 5 == 0 then
2023-09-27 18:58:37 +00:00
print (i, "Buzz")
2023-09-27 03:45:41 +00:00
else
print (i)
end
end