Fibonacci series
Fibonacci series
INTRODUCTION
Fibonacci series is very famous and important series.This type series is use in advertisement by which people get attracted toward ads. This strategy is use by internet ads,television ads, and many more.This program is written in turbo c++. please go through old posts for perfect knowledge.
THE PROGRAM
#include<iostream.h>#include<conio.h>
int main()
{
clrscr();
int n;
char y, fib(int n);
cout<<"\t\t----Fibonacci Series----\n\n";
cout<<"Enter number of terms : ";
cin>>n;
cout<<"\n\n";
n=n+1;
y=fib(n);
getch();
return 0;
}
char fib(int a)
{
int t[10];
t[0]=1;
t[1]=1;
cout<<t[0]<<" ";
cout<<t[1]<<" ";
for(int l=2;l<=a-2;++l)
{
t[l]=t[l-1]+t[l-2];
cout<<t[l]<<" ";
}
return t[a];
}
OUTPUT
THE CONCLUSION
There are many other type of program in c++ for Fibonacci series but this one was challenging for me so I prefer you all to understand this properly and then copy if you want to.
the most cooman example of fibonacci series is Yellow Chamomile flower.
Fibbbonacci series arew found in everywhere in the galaxy. The star are also example of fibonacci series thus I said above the wor GALAXY.So here I conclude this topic.
for more post like this please subscribe you will get notify through email.
No comments