Solved problem 1 - C