Added C solution for problem 6