Last active
August 29, 2015 14:06
-
-
Save danielbonnell/e96cbf5c23dc9770d64a to your computer and use it in GitHub Desktop.
99 Bottles Challenge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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