Answers

2014-10-18T21:45:52+05:30
#include<iostream.h>
#include<conio.h>
void main()
{
  clrscr(); 
  unsigned long first=0,second=1,third,n; 
cout<<"How many elements.(>5)\n";
 cin>>n; 
cout<<"Fibonacci Series:\n";
 cout<<first<<" "<<second; 
for(int i=2;i<n;i++) 
{
 third=first+second;
 cout<<" "<<third; 
first=second;
 second=third;
 }
 getch();
 }
0