Updated problem3.cpp and makefile.