Skip to main content

Posts

Showing posts with the label fibonacci series in c# program

fibonacci series using for loop in c# program

Hello everyone, I am going to share the code sample for the  fibonacci series using c# with c onsole application as given below. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication1 {     public class FibonacciSeries     {         public static int fiboSeries( int n)         {             int pre_no = -1;             int next_no = 1;             for ( int i = 0; i < n; i++)             {                 int sum = next_no + pre_no;   ...