//Write a C# program to print the Fibonacci Series of up to n numbers. Example: if N is 5 then 0, 1, 1, 2, 3, 5
using System;
class Program
{
static void Main()
Console.Write("Enter the value of N: ");
int n = int.Parse(Console.ReadLine());
PrintFibonacciSeries(n);
}
static void PrintFibonacciSeries(int n)
int a = 0, b = 1, c;
Console.Write("Fibonacci Series: ");
for (int i = 0; i <= n; i++)
if (i == 0)
Console.Write(a + " ");
else if (i == 1)
Console.Write(b + " ");
else
c = a + b;
a = b;
b = c;
Console.Write(c + " ");
Console.WriteLine();