complete challenge10.cpp