Update program2.cpp