Solve Exercise 5-1: fixed getint()