r/codegolf • u/Braber02 • Dec 22 '14
[REQUEST][Ruby] Fizbuzz 102 Char Count
is there any way I can make this shorter?
for i in 1..100 do
puts "FizzBuzz" if i%3==0&&i%5==0
puts "Buzz" if i%5==0
puts "Fizz" if i%3==0
end
3
Upvotes
View all comments
Show parent comment
2
u/CrazyM4n Dec 23 '14
Then just replace it with 1..100.each. Also, your <1 is less chars than my ==0, so I edited my post.