Added prob2.c
Finished prob2.c