Update 登翔's code modified.cpp