コード例 #1
0
        public static void RandomDemonstationOfRemarkableFibonacciSequences()
        {
            DemonstrateSolution();


            List <FibonacciGainQualities> listOfSmallInterestingNumbers;
            List <FibonacciGainQualities> listOfGrandInterestingNumbers;

            Console.WriteLine("Processing Fibonacci series, looking for sums fibonacci numbers with the property that\n" +
                              "half that sum number is equal to the sum of the same series including only equal fibonacci number.\n\n" +
                              "The first couple of them look like this:\n" +
                              "Here starting with a ceiling of 10 incrementing that ceiling tenfold.\n" +
                              "A hundred test are planned, but fewer are done because of Int32 size limits.");
            listOfSmallInterestingNumbers = FibonacciCalculations.GainPropertyTest(10, 100, 2, false, false);
            Console.WriteLine("List of fib numbers found doing a short sequence with a *2 increment to checked highest Fibinonacci number value");
            ListFoundNumbers(listOfSmallInterestingNumbers);
            //Console.ReadLine();
            //listOfGrandInterestingNumbers = FibonacciCalculations.GainPropertyTest(40, 600, 10, false, false);



            //Console.WriteLine("");
            //Console.WriteLine("List of productively found interesting fibonacci numbers");
            //ListFoundNumbers(listOfGrandInterestingNumbers);
        }
コード例 #2
0
 public static void ListFoundNumbers(List <FibonacciGainQualities> listOfInterestingNumbers)
 {
     Console.WriteLine("Listing the {0} found interesting relative numbers:", listOfInterestingNumbers.Count);
     for (int i = 0; i < listOfInterestingNumbers.Count; i++)
     {
         Console.WriteLine("||  Ceiling numeric {0} ||  Iteration #{1} ||   Fib#{1}: {2} ||   Sum of series: {3} || Sum of only equals: {4} "
                           , listOfInterestingNumbers[i].seriesMaxNumeric, listOfInterestingNumbers[i].iterationNumber, FibonacciCalculations.CalculateFibonacciNumber(listOfInterestingNumbers[i].iterationNumber), listOfInterestingNumbers[i].sumOfFibInts, (double)listOfInterestingNumbers[i].sumOfEqualFibInts);
     }
 }