answersLogoWhite

0

How do you generate fibbonaci series in c?

Updated: 8/17/2019
User Avatar

Wiki User

13y ago

Best Answer

#include<stdio.h>

main()

{

int n,first.sec,count,next;

scanf("%d",&n);

first=0,sec=1;

printf("d",first,sec);

for(count=3;count<=n;count++)

{

next=first+sec;

printf("%d",next);

first=sec;

sec=next;

}

}

To the original answerer, I recommend you do not #include <conio.h>, since it reduces portability and provides absolutely no functionality in this case.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you generate fibbonaci series in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is 610 a Fibbonaci number?

Yes it is.


Who created the Fibonacci Sequence?

Fibbonaci who else


Is there a 'c' code to generate the series a a b a b c?

#include &lt;stdio.h&gt; int main (void) { puts ("a a b a b c"); return 0; }


Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


How do you find the 111TH term of the sequence?

Depends on the sequence. There may be a formula for the Nth term in which case it is easy. Or the value may depend on some combination of previous terms (as in the Fibbonaci series).


Is there a c program to generate the series a a b a b c?

You need to be more specific in what you are asking. For example, the following meets your requirements: int main() { printf("a a b a b c\n"); return 0; }


Create a c plus plus program to generate Fibonacci series?

#include #include void main() { clrscr() int a=0,b=1,c,i,n; coutn cout


Write a program using while loop that generates Fabonaci series up to 200?

//to generate Fibonacci series upto a range of 200....(in C).... #include&lt;stdio.h&gt; main() { int a,b,c,i; a=0; b=1; printf("\n FIBONACCI SERIES .....\t"); i=1; while(i&lt;=(200-2)) { c=a+b; printf("\t%d",c); a=b; b=c; i++; } }


How write a c program to generate fibinocis series upto n turms?

int f1=1, f2=1, c=2; do { t=f1+f2; printf("%d\t",t); f1=f2; f2=t; c=c+1; }while(c


What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?

What is the assembly program to generate a geometric series and compute its sum The inputs are the base root and the length of the series The outputs are the series elements and their sum?


What does C means in nokia c series?

C means "classic" in nokia c series


What the feature can generate a series of values into adjacent cells based on the value of cells?

Auto Fill is the feature that can generate a series of value into adjacent cells based on the value of other cells.