From: Christian Neukirchen Date: 2006-04-01T19:06:52+09:00 Subject: Re: Learn to Program, by Chris Pine "Dave Burt" writes: > JB wrote: >> I'm stuck trying to do the part to make it do '99 bottles of beer on the >> wall' song. I get started in what I hope will work and next thing I know I >> have way too many variables and nothing makes sense. I even did something >> that made it loop the integer 0. I had to Ctrl-c on that one. >> >> Here's what I quit trying at, because no matter how many breaks I took or >> whatever, it just wasn't making any sense. : >> ... >> I too wish the author had put examples, say on some pages in the back or >> something. > > But if you ask this group, you can get interactive answers! > > Let's start again with that one. We need a loop counting down from 99. And therefore, we write in Ruby: 99.downto(1) { |bottles| ... } > Cheers, > Dave -- Christian Neukirchen http://chneukirchen.org