Skip to main content

Program to Find Fibonacci Series Upto Given Number

· One min read
Kaustubh Kulkarni
file.cpp
#include   
using namespace std;
int main()
{
int n;
cout<<"Enter Number ";
cin>>n;
cout<<"Series:";
int n1=0,n2=1,n3;
cout< cout<<" ";
cout<

for(int i=1;i<=n;i++)
{
n3=n1+n2;
cout<<" ";
cout< n1=n2;
n2=n3;


}
}