Update problem4.cpp