Ex 5.3: Added solution.