Example #1
0
    public static void Main()
    {
        int size;

        Console.WriteLine("enter the size of the array");

        size = int.Parse(Console.ReadLine());

        MyArray M = new MyArray();

        M.show(size);

        int n, i = 0, c;

        Console.WriteLine("Enter the number of terms of the fibonacci series:");
        n = int.Parse(Console.ReadLine());

        Console.WriteLine("Fibonacci series\n");

        FiboSeries f1 = new FiboSeries();

        for (c = 1; c <= n; c++)
        {
            int result = f1.FiboFunction(i);
            Console.Write(result + " ");
            i++;
        }
        Console.WriteLine();
    }
Example #2
0
        public void Test1()
        {
            //Arrange
            FiboSeries fibo = new FiboSeries();

            //Act
            var result = fibo.FiboFunction(0);


            //Assert
            Assert.IsType <int>(result);
            Assert.Equal(0, result);
            Assert.NotEqual(7, result);
        }