Update pat1039.cpp