Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Fibonacci in C

#include<stdio.h>
int Fibonacci(int);
int main()
{
 int n,i=0,x;
 scanf("%d",&n);
 printf("Fibonacci series\n");
 
 for(x=1;x<=n;x++ )
   {
    printf("%d\n", Fibonacci(i));
    i++; 
   }
   return 0;
}
int Fibonacci(int n)
{
 if(n==0)
  return 0;
 else if(n==1 )
  return 1;
 else
  return (Fibonacci(n-1) + Fibonacci(n-2));
}