Skip to content

Instantly share code, notes, and snippets.

@treyx
Created December 16, 2014 14:41
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 treyx/2d0de21507626b71e893 to your computer and use it in GitHub Desktop.
Save treyx/2d0de21507626b71e893 to your computer and use it in GitHub Desktop.
multiple = 's'
99.downto(1) do |i|
if i > 2
then
puts "#{i} bottle#{multiple} of beer on the wall"
puts "#{i} bottle#{multiple} of beer"
puts "take one down pass it around,"
else
puts "#{i} bottle of beer on the wall"
puts "#{i} bottle of beer"
puts "take one down pass it around,"
end
if i > 1
puts "#{i - 1} bottle#{multiple} of beer on the wall"
else puts "No more bottles of beer on the wall, no more bottles of beer.
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