Skip to content

Instantly share code, notes, and snippets.

@mikeadeleke
Last active December 31, 2015 16:39
Show Gist options
  • Save mikeadeleke/8014624 to your computer and use it in GitHub Desktop.
Save mikeadeleke/8014624 to your computer and use it in GitHub Desktop.
99 bottles
def bottle_song(i)
while i > 2
puts "#{i} bottles of beer on the wall, #{i} bottles of beer. "
puts "Take one down, pass it around, #{i - 1} bottles of beer on the wall!"
i = i - 1
end
puts "2 bottles of beer on the wall, 2 bottles of beer."
puts "Take one down, pass it around. 1 bottle of beer on the wall!"
puts "1 bottle of beer on the wall, 1 bottle of beer."
puts "Take one down, pass it around. No more bottles of beer on the wall!"
end
bottle_song(99)
@mikeadeleke
Copy link
Author

Just updated! I am curious to know what is "driver code". I've been having problems running it as well.

@richiethomas
Copy link

We're making progress, Mike. Let's punt on the rest until our session, as there are several things we should talk about that are kind of intertwined. Cool?

@mikeadeleke
Copy link
Author

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment