Coffeehouse Post

Single Post Permalink

View Thread: Nicely done, Channel 9 (posted by Dr Herbie).
  • User profile image

    giovanni said:
    CreamFilling512 said:

    That was easy! Your solution is much faster than mine! Excel is not the best tool for this kind of problems, but I didn't have anything handy at the office.


    Still not sure what the first equation meant...

    This is my naive solution to the second problem, it approaches 9 as k approaches infinity.


    static void Main(string[] args) { 
        Func<double, double> f = (k) => (Math.Pow((1 + (1 / k)), 3)) / (1 + (3 / k)); 
        double z = f(1); 
        for (double k = 2; k < double.MaxValue; k++) { 
            z *= f(k);
            Console.WriteLine(3 + z);