added solution for problem 4 in csharp