Solve Exercise 5-2: getfloat()