% hw032.m
% John Burkardt
% When does the Theron formula predict a child's weight will exceed 1000 pounds?
%
age = 0;

while ( true );

  lb = 2.20462 * exp ( 0.175571 * age + 2.197099 );

  if ( 1000 < lb )
    break;
  end

  age = age + 1;

end

fprintf ( '  At age = %d, predicted weight = %g > 1000.\n', age, lb );