Beispiel #1
0
        static void Main(string[] args)
        {
            Animal animal = new Animal();
            Duck duck = new Duck();

            duck.nNumbOfLegs = 2;

            BigInteger a = 1;
            BigInteger b = 1;
            BigInteger answer = 0;
            for(BigInteger x = 0; x<40000; x++)
            {
                BigInteger y = Fib(a,b);
                b = a;
                a = y;

                answer += y;
            }

            Console.WriteLine(answer);
            Console.Write(duck.nNumbOfLegs); //outputs the number of legs my duck has
            Console.Read(); //waits for input to keep the console up until keep pressed
        }