Last active
November 12, 2015 21:08
-
-
Save kylekeesling/e15e9b8bee26a53ac57d to your computer and use it in GitHub Desktop.
Output the 99 bottles of beer song with numbers in words rather than integers
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
require_relative 'english_number.rb' #https://gist.github.com/kylekeesling/4b73a984421f120312de | |
num_bottles = 999 | |
while num_bottles > 0 | |
puts "#{englishNumber(num_bottles)} bottles of beer on the wall, | |
#{englishNumber(num_bottles)} bottles of beer, take one down, pass it | |
around, #{englishNumber(num_bottles - 1)} bottles of beer on the wall!" | |
num_bottles = num_bottles - 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment