Bhuvan InfoTech Android App

Download our Android App and browse Technical News, Projects, Computer Tricks more easily with lots of Interesting Features.

Tuesday, June 14, 2016

Fibonacci Series | C program

#include<stdio.h>
#include<conio.h>

int main()
{
     int k,n;
     int a=0,b=1,g;

     printf("Enter the range of the series: ");
     scanf("%d",&n);
     printf("Fibonacci Series is : ");
     printf("%d ",0);
     while(n>1)
     {
         g = a + b;
         a = b;
         b = g;
         printf("%ld ",g);
         n--;
     }
     getch();
}
Bhuvan Arora

No comments:

Amazing Deal !