Create exercise3.22.cpp