Update ex_7.cpp