Add a C solution for problem 2