Added C++ solution to problem 7.
Updated C solution to problem 7