Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var sequence = new FibonacciSequence();

            foreach (var item in sequence.Take(50))
            {
                Console.WriteLine(item);
            }
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public void First10ElementsCorrect()
        {
            var sequence = new FibonacciSequence().Sequence;

            Assert.AreEqual(new BigInteger[] { 0, 1, 1, 2, 3, 5, 8, 13, 21, 34 }, sequence.Take(10));
        }