C Programs

Write a C program which prints Fibonacci series?

/* Write a C Program which prints fibonacci series */
#include <stdio.h>
#include<conio.h>
#define limit 15
int main()
{
  int i,feb[limit];
  clrscr();
  feb[0] = 0;
  feb[1] = 1;
  /* store all elements in array feb[] */
  for(i=2; i < limit; i++){
      feb[i] = feb[i-1] + feb[i-2];
  }
  /* print all array elements */
  printf("Fibonaci Series : ");
  for(i=0; i< limit; i++){
   printf("%d ",feb[i]);
  }
  getch();
  return 0;
}
www.000webhost.com