Create exercise7.4.cpp