Assigment 01 Problem 03 solver