# how to code fibinocci series

Page 1 of 1

## 2 Replies - 610 Views - Last Post: 24 October 2008 - 04:15 AMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=68857&amp;s=de4bd383b65089e11bcfd0aea9270977&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 malik saud

Reputation: 0
• Posts: 1
• Joined: 23-October 08

# how to code fibinocci series

Posted 23 October 2008 - 11:14 PM

hi
i wana get info about how to write fibinocci series in c++
Is This A Good Question/Topic? 0

## Replies To: how to code fibinocci series

### #2 AmitTheInfinity

• C Surfing ∞

Reputation: 119
• Posts: 1,565
• Joined: 25-January 07

## 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 master_9002

Reputation: 0
• Posts: 3
• Joined: 21-October 08

## 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.
```#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