#include<stdio.h>

int fib(int n);

int main() {
    printf("%d",fib(6));
    return 0;
}

int fib(int n) {
        if(n==0) {
             return 0;
        }
        if (n==1)  {
             return 1;
        }
   int fibNm1=fib(n-1);
   int fibNm2=fib(n-2);
   int fibN=fibNm1 + fibNm2;
  // printf(" fib  of %d  is : %d \n",n,fibN);
     return fibN;
}   
    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: