additional programs from exercise-2
adding some more programs from chap-2