@derekhubbard/FizzBuzz in Lua - Nic and Derek
Lua

No description

repl talk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function printOutput(i) 
	if (i % 3 == 0 and i % 5 == 0) then
		print('FizzBuzz')
	elseif i % 3 == 0 then
		print('Fizz') 	
	elseif i % 5 == 0 then
		print('Buzz') 	
	else 
		print(i) 	
	end
end

for i = 1, 100 do 
	printOutput(i)
end
Lua 5.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio [GCC 4.2.1 (LLVM, Emscripten 1.5)] on linux2