0 votes
4 views
in Programming by (5.4k points) | 4 views

1 Answer

0 votes
#include<iostream.h>
#include<conio.h>

void main()
{
 int n1,n2,n,i;

 clrscr();
 n1=0;
 n2=1;

 cout<<"Fibonacci series :"<<endl;
 cout<<n1<<endl;
 cout<<n2<<endl;
 for (i=3;i<=20;i++)
 {
n=n1+n2;
cout<<n<<endl;
n1=n2;
n2=n;
  }
  getch();
}
by (5.4k points)
500 questions
477 answers
8 comments
12 users