From: Josh Cheek Date: 2010-02-26T03:19:38+09:00 Subject: Re: Help on algorithm to calculate combinations --000e0cd100aa4c2213048070d306 Content-Type: text/plain; charset=ISO-8859-1 On Thu, Feb 25, 2010 at 6:43 AM, Alexander Antonakakis wrote: > Josh Cheek wrote: > > Sorry, computer lagged and I hit 'send' rather than clicking in the > > window > > to edit. > > Thanks Josh :) > -- > Posted via http://www.ruby-forum.com/. > > lol, you're welcome. But I just saw that it prints an empty line for the empty room. That's what I get for not testing. Try adding this line to the beginning of the block: next( puts "empty room" ) if men.zero? && children.zero? --000e0cd100aa4c2213048070d306--