SonOfLilit wrote: > On 4/9/07, Merrie <merries / comcast.net> wrote: >> This program produces an infinate loop. I am learning from Learn to >> Program and do not have a clear example how to do this particular >> example. It is suppose to count down the bottles and repeat the phrase >> until it reach 0 bottles of beer then end :) >> >> Merrie >> ------------------------------------------------------------------------------------- >> >> >> beers = 99 >> beerno = beers - 1.to_i >> while beerno != 1 >> puts '99 bottles of beer on the wall, take one down, pass it >> around, there are ' + beerno.to_s + 'bottles of beer on the wall.' >> >> end > > You never decrement beerno. At least not within the while loop. A: Because it makes it hard to read replies. Q: Why is top-posting bad? -- Phillip "CynicalRyan" Gawlowski http://cynicalryan.110mb.com/ Rule of Open-Source Programming #33: Don't waste time on writing test cases and test scripts - your users are your best testers.