Created
April 23, 2016 20:12
-
-
Save bparanj/a321b3790bdce2d7796a9bdcb7a1c1cc 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
1.upto(100) do |i| | |
if i % 3 == 0 && i % 5 == 0 | |
puts 'FizzBuzz' | |
elsif i % 3 == 0 | |
puts 'Fizz' | |
elsif i % 5 == 0 | |
puts 'Buzz' | |
else | |
puts i | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment