Problem 5, C#