Add ex1.10(final version)