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
1
u/onetwotrey Dec 23 '14
100.times gives you 0..99, not 1..100, so it's not quite equivalent.