Exemplo n.º 1
0
        public int Run()
        {
            FibonacciGenerator gen = new FibonacciGenerator(4000000);

            IEnumerable <int> evenFibs = gen.Numbers.Where(f => f % 2 == 0);

            return(evenFibs.Aggregate(0, (sum, f) => sum + f));
        }
Exemplo n.º 2
0
        public int Run()
        {
            FibonacciGenerator gen = new FibonacciGenerator(4000000);

            IEnumerable<int> evenFibs = gen.Numbers.Where(f => f % 2 == 0);

            return evenFibs.Aggregate(0, (sum, f) => sum + f);
        }