Try out this problem on your own and see how C# solves problems for you.
Read this post on petrushkagoogol2.blogspot.com