Skip to content

Instantly share code, notes, and snippets.

@mcshakes
Created December 16, 2014 03:32
Show Gist options
  • Save mcshakes/ebf870b67c7336f5d456 to your computer and use it in GitHub Desktop.
Save mcshakes/ebf870b67c7336f5d456 to your computer and use it in GitHub Desktop.
99 Bottles of Beer...
bottle = 99
while bottle > 0
puts "#{bottle} bottle#{'s' unless bottle == 1} of beer on the wall,"
puts "#{bottle} bottle#{'s' unless bottle == 1} of beer."
puts "Take one down, pass it around"
"#{bottle} bottles of beer on the wall!"
bottle -= 1
if bottle == 0
puts "No more bottles of beer on the wall, no more bottles of beer."
puts "Go to the store and buy some more, 99 bottles of beer on the wall."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment