Fibonacci series.
Fibonacci series
Fibonacci series is series of term in which any term is sum of it's preceding two term.This is important program which is frequently asked.
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int limit=0,a=0,b=1,c;
printf("Enter limit\n");
scanf("%d",&limit);
for(int i=1;i<=limit;i++)
{
printf("%d",a);
c=a+f;
a=f;
f=c;
}
getch();
}
Fibonacci series.
Reviewed by Deepak kumar soni
on
December 29, 2018
Rating:
No comments: