Skip to content

Instantly share code, notes, and snippets.

@eljojo
Created March 31, 2014 19:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eljojo/9900657 to your computer and use it in GitHub Desktop.
Save eljojo/9900657 to your computer and use it in GitHub Desktop.
learn ruby with beer
def sing(number)
puts "#{number} bottles of beer on the wall,"
puts "#{number} bottles of beer."
puts "Take one down, pass it around,"
puts "#{number - 1} bottles of beer on the wall."
end
99.downto(1).each do |number|
sing(number)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment