Full implementation of problem2.c