Skip to content

Instantly share code, notes, and snippets.

@jbrechtel
Created June 5, 2012 00:52
Show Gist options
  • Select an option

  • Save jbrechtel/2871753 to your computer and use it in GitHub Desktop.

Select an option

Save jbrechtel/2871753 to your computer and use it in GitHub Desktop.
numb = 10
while numb != 0
bottle = "bottle"
if numb > 1
bottle = "bottles"
end
puts numb.to_s + ' ' + bottle + ' of beer on the wall ' + numb.to_s + ' ' + bottle +' of beer'
numb = (numb - 1)
if numb == 0
puts 'take it down, pass it around no bottles of beer on the wall'
else
puts 'take one down, pass it around ' + numb.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