Program to Print Fibonacci Series using Recursion in C

Print Fibonacci Series using Recursion

#include <stdio.h>

int fibbo(int, int, int, int);
 
main()
{
         int n, f, x=0, y=1, i=3;
         printf(" Enter value of n: ");
         scanf("%d", &n);

         printf(" %d %d", x, y);

         fibbo(x, y, n, i);

         getch();
}

fibbo(int x, int y, int n, int i)
{
         int z;

         if (i <= n)
         {
                  z = x + y;
                  printf(" %d", z);
                  x = y;
                  y = z;
                  i++;
                  fibbo(x,y,n,i);
         }
}