-
-
Save jcasimir/926534 to your computer and use it in GitHub Desktop.
This file contains 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
begin | |
beer = 3 | |
while beer > 1 | |
# Repeat what's in here as long as it's TRUE that the counter is greater than zero | |
puts "#{beer} bottles of beer on the wall, #{beer} bottles of beer! Take one down and pass it around," | |
beer = beer - 1 | |
if beer > 1 | |
puts "#{beer} bottles of beer on the wall." | |
else | |
puts "#{beer} bottle of beer on the wall." | |
end | |
end | |
puts "#{beer} bottle of beer on the wall. #{beer} bottle of beer! Take one down down, pass it around," | |
puts 'There are no bottles of beer on the wall, no bottles of beer, you can\'t take any down or pass \'em around, there are no bottles of beer on the wall.' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment