Added ex2.17 and ex2.18 solutions