From: Thomas Preymesser Date: 2008-02-28T00:24:30+09:00 Subject: Re: Math problem ------=_Part_26230_6310550.1204125877341 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 26/02/2008, grandmabeckie@msn.com wrote: > > I am try to help my daughter: > Problem > > father is 4 times older then his daughter. > in 6 years he will be 3 times older what is the answer and how did you > reach it. 48 and 12 def all_conditions(f,d) f == 4*d and f+6 == (d+6)*3 end loop do daughter = rand(father = rand(100)) if all_conditions(father,daughter) puts "father: #{father} daughter: #{daughter}" break end end ------=_Part_26230_6310550.1204125877341--