Please read the guide .
Please answer the question in detail
Code :
#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(); }
Output::
Doubtly is an online community for engineering students, offering:
Get the pro version for free by logging in!
5.7k questions
5.1k answers
108 comments
559 users