SCREENSHOTS
CODING
Starts From Here ------>>
#include<iostream.h>
#include<conio.h>
void main()
{ int i,x,a=0,b=1,c;
clrscr();
cout<<"\nNo. of Elements: ";
cin>>x;
cout<<"\n\t\tFIBONACCI SERIES:-"<<endl;
for(i=1;i<=x;i++)
{ cout<<"\n\t\t\t"<<i<<") "<<a;
c=a;
a+=b;
b=c;
}
getch();
}
<<-------End Here
No comments:
Post a Comment