Added C and C++ solutions to problem 10.