Exercise#6-10 from 12