Update lab3.cpp

part 4