Add Problem 6 C solution