Here we will write a simple program to print Fibonacci Series. In the Fibonacci Series, the next number is the sum of the previous two numbers.

## C# Program to Print Fibonacci Series

In the Fibonacci Series, the next number is the sum of the previous two numbers.

``` 0, 1, 1, 2, 3, 5, 8, 13, 21 etc

```
```using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
static void Main(string[] args)
{
int iFirst = 0, iSecond = 1, iThird, iCount, iInput;
Console.Write("Enter the number of elements: ");
Console.Write(iFirst + " " + iSecond + " "); //printing 0 and 1
for (iCount = 2; iCount < iInput; ++iCount) //loop starts from 2 because 0 and 1 are already printed
{
iThird = iFirst + iSecond;
Console.Write(iThird + " ");
iFirst = iSecond;
iSecond = iThird;
}
}
}```

## Output:

```Enter the number of elements: 6
>0 1 1 2 3 5```

## View More:

### Conclusion:

I hope you would love this post. Please don’t hesitate to comment for any technical help. Your feedback and suggestions are welcome.

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, bool given in C:\inetpub\vhosts\debugonweb.com\httpdocs\wp-includes\wp-db.php on line 3353