Problem 3, C#