In this program you will learn how to generate the fibonacci series using c.

Lets Start Fibonacci series is a sequence of numbers in which the next number is generate by adding previous two numbers.

For example 0, 1, 1, 2, 3, 5, 8, 13, 21, 34.

ALGORITHM:-

Step 1: Initialize the variables i=0, j=1, add=0

Step 2: Enter the number of term

Step 3: Print the first and second number

Step 4: Start loop and add = i + j

Step 5: i = j, j = add and print the add

Step 6: Repeat the step 4 until loop is not terminate

Step 7: End

PROGRAM CODE:-

#include <stdio.h> #include <conio.h> void main() { int i = 0, j = 1, a, r, f; clrscr(); printf("enter the range"); scanf("%d", &r); printf("%d", i); for(a = 2; a < r; a++) { f = i + j; i = j; j = f; printf("%d, ", i); } getch(); }

OUTPUT:-

enter the range: 10 0, 1, 1, 2, 3, 5, 8, 13, 21, 34

C program to generate the fibonacci series How to generate fibonacci series using c fibonacci sequence in c programming C program to generate the fibonacci series within given range

This website was… how do you say it? Relevant!! Finally I have found

something that helped me. Thanks!

This post is truly a good one it helps new the web visitors, who are wishing in favor of

blogging.

Good information. Lucky me I ran across your blog

by chance (stumbleupon). I’ve book-marked it for later!

So nice to discover somebody with some unique thoughts on this subject.

This is a very good tip especially to those fresh to the blogosphere. Brief but very precise informationвЂ¦ Appreciate your sharing this one. A must read article!