Update lab5.cpp