Solve Exercise 4-9: Pushed EOF and [un]getch()