Update HW3.cpp

edited in browser not tested in visual studio