problem10.cpp v- 1.1