Update exercise3.22.cpp