Skip to content

Instantly share code, notes, and snippets.

@annawinkler
Created March 14, 2014 15:51
Show Gist options
  • Save annawinkler/9550470 to your computer and use it in GitHub Desktop.
Save annawinkler/9550470 to your computer and use it in GitHub Desktop.
#
# This file demonstrates FizzBuzz in Ruby
#
(1..20).each do |number|
puts "Checking #{number}"
puts "FIZZ" if number % 3 == 0
puts "BUZZ" if number % 5 == 0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment