Update ex5_17.cpp

Before it will always output the"ture"
Merge branch 'gupenghu-patch-1'
fixed ex5_17