-
-
Save danielleschechter/7252409 to your computer and use it in GitHub Desktop.
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
class BottlesOfBeer | |
def count_off | |
puts "How many bottles of beer have you got? " | |
numbers = gets.chomp.to_i | |
numbers.downto(1) do |number| | |
puts "#{number} bottles of beer on the wall, #{number} bottles of beer! Take one down, pass it around, #{number-1} bottles of beer on the wall!" | |
end | |
end | |
bottle = BottlesOfBeer.new | |
bottle.count_off | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment