//C++ Program for Fibonacci series
//cpp program to find fibonacci series
#include<iostream>
using namespace std;
int main()
{
int n, first = 0, second = 1, next;
cout << "Enter the number of terms of Fibonacci series you want " << endl;
cin >> n;
cout << "Fibbonacci Series of first "<<n<<"numbers is = " <<endl;
for ( int i = 0 ; i < n ; i++ )
{
if ( i <= 1 )
next = i;
else
{
next = first + second;
first = second;
second = next;
}
cout<<next<<endl;
}
return 0;
}
//How to find fibonacci Series in C++/Cpp
//How to find fibonacci Series in C++/Cpp
//C++ program for fibonacci Number
//How to find fibonacci Series in C++/Cpp
//How to find fibonacci Series in C++/Cpp
//C++ program for fibonacci Number
//cpp program to find fibonacci series
#include<iostream>
using namespace std;
int main()
{
int n, first = 0, second = 1, next;
cout << "Enter the number of terms of Fibonacci series you want " << endl;
cin >> n;
cout << "Fibbonacci Series of first "<<n<<"numbers is = " <<endl;
for ( int i = 0 ; i < n ; i++ )
{
if ( i <= 1 )
next = i;
else
{
next = first + second;
first = second;
second = next;
}
cout<<next<<endl;
}
return 0;
}
//How to find fibonacci Series in C++/Cpp
//How to find fibonacci Series in C++/Cpp
//C++ program for fibonacci Number
//How to find fibonacci Series in C++/Cpp
//How to find fibonacci Series in C++/Cpp
//C++ program for fibonacci Number