Answers for "ruby negative indices fizz buzz"

0

ruby negative indices fizz buzz

# Rosettacode.org has this excellent one-line FizzBuzz solution in Ruby.
# It works because Ruby allows negative indices.

1.upto(100){|n|puts'FizzBuzz '[i=n**4%-15,i+13]||n}
Posted by: Guest on February-20-2021

Browse Popular Code Answers by Language