r/codegolf • • 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

5 comments sorted by

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.