Create exercise3.10.cpp