Created
January 16, 2018 20:20
-
-
Save underhilllabs/90f20b875f22a3ce63bf717fa15f3f6d to your computer and use it in GitHub Desktop.
fizzbuzz ruby
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).each do |n| | |
print "fizz" if n % 3 == 0 | |
print "buzz" if n % 5 == 0 | |
print n if (n % 3 != 0 && n % 5 != 0) | |
end |
Author
underhilllabs
commented
Jan 16, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment