hi
i wana get info about how to write fibinocci series in c++
how to code fibinocci series
Page 1 of 12 Replies - 428 Views - Last Post: 24 October 2008 - 04:15 AM
Replies To: how to code fibinocci series
#2
Re: how to code fibinocci series
Posted 24 October 2008 - 12:12 AM
There are snippets available on this topic in snippets section. And there are lot of similar topics with solutions are also there. Just have some search on the website and you will get your answer.
#3
Re: how to code fibinocci series
Posted 24 October 2008 - 04:15 AM
There you go. Thats the basic and most simple form of fibonacci series.
Hope u find it useful. Bye
#include<iostream.h>
#include<conio.h>
void main()
{
int a=0,b=1,c=0,n,i=0;
clrscr();
cout<<"Enter the number of terms to be printed :- ";
cin>>n;
cout<<a<<" "<<b<<" ";
i=2;
while(i<n)
{
c=a+b;
a=b;
b=c;
cout<<c<<" ";
i++;
}
getch();
}
Hope u find it useful. Bye
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|