Skip to content

Instantly share code, notes, and snippets.

@tisba tisba/fizzbuzz.rb forked from judofyr/fizzbuzz.rb
Created Aug 6, 2012

Embed
What would you like to do?
Writing FizzBuzz with flip-flops
a=b=c=(1..100).each do |num|
print num, ?\r,
("Fizz" unless (a = !a) .. (a = !a)),
("Buzz" unless (b = !b) ... !((c = !c) .. (c = !c))),
?\n
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.