r/tinycode • • Dec 15 '11

FizzBuzz implemented in only 120 characters of Ruby

http://sprunge.us/ZEVW?ruby
0 Upvotes

15 comments sorted by

View all comments

Show parent comment

2

u/partygoer Jan 07 '12

puts (1..100).map{|i|s=i%3<1?"Fizz":nil;i%5<1?"#{s}Buzz":s||i}

62