Update program7.cpp