added solution for problem 2 in d
added solution for problem 2 in csharp