Solve Exercise 4-2: atof() enhanced