Reverse Polish calculator - exercises 4-3, 4-4 and 4-5 of K & R