Problem 2, C#
Problem 1, F#