Post Top Ad

Your Ad Spot

Pages

Sunday, 9 February 2020

Display Fibonacci Serise Upto N

#include<stdio.h>
#include<conio.h>

void Fibonacci(int n)
{
   int i,a=0,b=1,c;
printf("%d",b);
for(i=1;i<n;i++)
{
c=a+b;
printf(" %d",c);
a=b;
b=c;
}
  }
  void main()
  { 
    Fibonacci(10);
  }

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages