update pro2.cpp and pro3.cpp