Skip to content

Instantly share code, notes, and snippets.

@kylekeesling
Last active November 12, 2015 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylekeesling/e15e9b8bee26a53ac57d to your computer and use it in GitHub Desktop.
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
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