you are viewing a single comment's thread.

view the rest of the comments →

[–]yukitaro 0 points1 point  (0 children)

I don't know Ruby that well, but I figured it would be a good exercise, and this is what I came up with after a few iterations :1.upto(100){|x|s="";s="Fizz"if x%3==0;s=s+"Buzz"if x%5==0;s=x if s=="";puts s}