complete challenge5.cpp