Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            string fileName = args[0];
            string[] fileContents;
            int numberInSeries;
            int calculatedFibonacciNumber;
            FibonacciNumber fibonacciNumber = new FibonacciNumber();

            fileContents = GetFileContents(fileName);

            for(int i = 0; i<fileContents.Length; i++)
            {
                numberInSeries = Convert.ToInt32(fileContents[i]);
                calculatedFibonacciNumber = fibonacciNumber.CalculateFibonacciNumber(numberInSeries);
                Console.WriteLine(calculatedFibonacciNumber);
            }
        }
Ejemplo n.º 2
0
 public void TestSetup()
 {
     fibonacciNumber = new FibonacciNumber();
 }