Created
April 27, 2016 01:26
-
-
Save joshuastr/156bb3ff5b7b752e4cb303ef015683d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fizzbuzz(x,y) | |
(x..y).each do |i| | |
case | |
when i % 15 == 0 then puts "FizzBuzz" | |
when i % 3 == 0 then puts "Fizz" | |
when i % 5 == 0 then puts "Buzz" | |
when i % 7 == 0 then puts "Fizzzzzzz" | |
else | |
end | |
end | |
end | |
fizzbuzz(20,200) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment