solved ex2.2 a,b,c