Problem 11 CSharp solution