Add the problem 4 and a solution written in C.