Update lab4.cpp