solution of exercise 1-13
solution of exercise 1-14