Solve Exercise 4-10: getline()-based calculator