Created
March 31, 2014 19:47
-
-
Save eljojo/9900657 to your computer and use it in GitHub Desktop.
learn ruby with beer
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
def sing(number) | |
puts "#{number} bottles of beer on the wall," | |
puts "#{number} bottles of beer." | |
puts "Take one down, pass it around," | |
puts "#{number - 1} bottles of beer on the wall." | |
end | |
99.downto(1).each do |number| | |
sing(number) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment