You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In mathematics, the Fibonacci numbers, commonly denoted Fₙ, form a sequence, called the Fibonacci sequence, such that each number is the sum of the two preceding ones, starting from 0 and 1.
*/
#include<iostream>
using namespace std;
void fibbo(int n)
{
int a=0,b=1,c;
int i=2;
cout<<" "<<a<<" "<<b;
while(i!=n)
{
c=a+b;
cout<<" "<<c;
a=b;
b=c;
i++;
}
}
int main()
{
int n;
cout<<"\n Fibonacci series\n";
cout<<"\n Enter the number of terms : ";
cin>>n;
cout<<"\n "<<n<<" terms of fibbonacci series are : ";