Headlines
Loading...
C Program to print fibonicci series

C Program to print fibonicci series

C Program to print fibonicci series

#include<stdio .h="">
#include<conio .h="">
void main()
{
int a=0,b=1,c,n,i;
clrscr();
printf("\nEnter the no:");
scanf("%d",&amp;n);
printf("%d %d",a,b);
for(i=3;i&lt;=n;i++)
{
c=a+b;
a=b;
b=c;
printf(" %d",b);
}
getch();
}

**************OUTPUT************

Enter the no:10
0 1 1 2 3 5 8 13 21 34</conio></stdio>
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***