From: Chris Guo Date: 2008-02-28T10:44:56+09:00 Subject: Re: Math problem On Feb 26, 4:28 pm, grandmabec...@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. > Thanks, a mom in CA 0.upto(100) do |father_age| 0.upto(100) do |daughter_age| if (father_age == 4* daughter_age) && (father_age+6 == 3* (daughter_age+6)) puts "father age is "+father_age.to_s+", and daughter_age="+daughter_age.to_s end end end father age is 48, and daughter_age=12