Condensate fraction and critical temperature of a trapped interacting Bose gas