# 99 bottles countdown

**URL:** <https://www.ruby-forum.com/t/99-bottles-countdown/168888>\
**Category:** Ruby\
**Created:** [May 27, 2009, 3:15am UTC](https://www.ruby-forum.com/t/99-bottles-countdown/168888 "2009-05-27T03:15:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![calvin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f475e1/32.png) [@calvin](https://www.ruby-forum.com/u/calvin)\
**Post date:** [May 27, 2009, 3:15am UTC](https://www.ruby-forum.com/t/99-bottles-countdown/168888/1 "2009-05-27T03:15:55Z")

</div>

Hi,

I am a beginner trying to write a Ruby program that mimics the song

- ‘99 bottles of beer on the wall’. I want the program to ask ‘how  
many bottles…’ on the wall, subract 1 from that number, and then ask  
the question again until it gets down to 1 bottle of beer on the wall.  
So far can only get the program to subtract the number once and then  
the program stops. Any hints, suggestions, or reccomendations to a  
page/chapter in the ‘Programming Ruby 1.8’ book would be greatly  
appreciated. Here is the Ruby code I put together so far:

---

<div class="post-metadata">

**Author:** ![calvin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f475e1/32.png) [@calvin](https://www.ruby-forum.com/u/calvin)\
**Post date:** [May 27, 2009, 3:55am UTC](https://www.ruby-forum.com/t/99-bottles-countdown/168888/2 "2009-05-27T03:55:55Z")

</div>

On May 26, 6:10 pm, Calvin [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks for your time,
> 
> Calvin

I should have searched for similar projects in the group discussions-  
found my answer… kind of. Sorry to bother you guys.
