added file p003.c
solved problem 3