Created
October 2, 2012 04:57
-
-
Save scottchiang/3816245 to your computer and use it in GitHub Desktop.
99 bottles
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 ninety_nine_bottles(num) | |
| while num>=0 | |
| if num == 0 | |
| puts "No more bottles of beer on the wall :/" | |
| break | |
| else | |
| puts "#{num} bottles of beer on the wall" | |
| puts "#{num} bottles of beer" | |
| puts "Take one down, pass it around" | |
| puts "#{num-1} bottles of beer on the wall" | |
| num -= 1 | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment