Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Kata as seen in http://www.solveet.com/exercises/Kata-FizzBuzz/11
- ------- [[ Métodos ]] ---------
- function fizz( n )
- if n % 15 == 0 then print "FizzBuzz"
- elseif ( n % 3 == 0 ) then print "Fizz"
- elseif ( n % 5 == 0 ) then print "Buzz"
- else print ( n )
- end
- end
- ------- [[ Main ]] ---------
- for i =0, 100 do
- fizz ( i )
- i = i+1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement