This question already has an answer here:
I am interested in learning some new programming languages and looking for the collection of short solutions for programming problems provided in different languages. The optimal format would be:
Problem description
Language A: .... (solution)
Language B: .... (solution) etc
It would be best if I could sort/filter the samples basing upon the languages and programming paradigms.
What I am currently doing is using the Project Euler and some other sites for programming contests where I first have to solve a problem on my own and then I can pick the examples in the languages I am interested in the forum thread of this particular problem. This is ok, but sometimes it is a somewhat too long way for me.