Added solution for problem 12 in C