solution

solution for ProgrammingAssignment2