problem2.cpp