Skip to content

Instantly share code, notes, and snippets.

@danielbonnell
Last active August 29, 2015 14:06
Show Gist options
  • Save danielbonnell/e96cbf5c23dc9770d64a to your computer and use it in GitHub Desktop.
Save danielbonnell/e96cbf5c23dc9770d64a to your computer and use it in GitHub Desktop.
99 Bottles Challenge
beers = 99
while beers > 0
puts beers.to_s + ' bottles of beer on the wall, ' + beers.to_s + ' bottles of beer!'
beers -= 1
if beers < 1
puts "Ya take one down, pass it around, no more bottles of beer on the wall!"
else
puts 'Ya take one down, pass it around, ' + beers.to_s + ' 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