I recently had an interview where I was given the task of calculating the mathematical constant PI. I was going to do it in a single line of code (to show off my Linq prowess), but thought the interviewer would have considered me a bit of a geek, so I fleshed it out to his expectations.
But heres the line anyway
var pi = Enumerable.Range(0, 100000000).Aggregate(0d, (tot, next) => tot += Math.Pow(-1d, next)/(2*next + 1)*4);
Not bad !!
Dean