Example #1
0
        public static void Problem1()
        {
            int answer = MultiplesOf3And5.FindMultiplesOf3And5(limit: 1000);

            Console.WriteLine("The answer to problem 1 is {0}.", answer);
            Console.ReadKey();
        }
        public static void Problem1()
        {
            var m = new MultiplesOf3And5();

            var below = m.FindNaturalNumbersBelow(1000);
            var filtr = m.Filter(below, m.EulerPredicate);
            var summm = m.Sum(filtr);

            Console.WriteLine(summm);
        }
Example #3
0
        public static void Main(string[] args)
        {
            int problem1 = MultiplesOf3And5.Calculate(1000);

            Console.WriteLine(problem1);

            int problem2 = EvenFibonacciNumbers.Calculate(4000000);

            Console.WriteLine(problem2);

            Console.ReadKey();
        }
Example #4
0
 public void TestMultiplesOf3And5()
 {
     Assert.AreEqual(233168, MultiplesOf3And5.Solution());
 }