Update problem8.cpp