Answers for "C# Fibonacci list"

C#
0

C# Fibonacci list

static IEnumerable<int> Fibonacci()
{
    int current = 1, next = 1;

    while (true)
    {
        yield return current;
        next = current + (current = next);
    }
}
Posted by: Guest on February-19-2022

C# Answers by Framework

Browse Popular Code Answers by Language