problem3 input code finished&tested