Update ex7_31.cpp
Merge pull request #50 from shbling/patch-3

Update ex7_31.cpp