Worked on Problem23.cpp