Update final_ex_1014.cpp