Added a code of 8th problem.