Solved Chapter6 problems.