// --- Directions
// Print out the n-th entry in the Fibonacci series.
// The Fibonacci series is an ordering of numbers where
// each number is the sum of the preceding two.
// For example, the sequence
// [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
// forms the first ten entries of the Fibonacci series.
// Example:
// Fib(4) === 3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CSharp
{
class Program
static void Main(string[] args)
IsEqual(Fib(4), 3);
IsEqual(Fib(9), 34);
IsEqual(Fib(14), 377);
IsEqual(Fib(24), 46368);
Console.Read();
}
static public int Fib(int n)
return -1;
static public void IsEqual(int value, int expectedValue)
Console.WriteLine(value == expectedValue ? "PASSED" : "FAILED");