#include <stdio.h>

int fib(int n);

int main() {
    
    printf("fibonacci is %d",fib(9));
    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;
        return fibN;
    }
    /* fib series----0,1,1,2,3,5,8,13,21...
    0th fib series is 0
    1st fib series is 1
    2nd fib series is 1...*/
    
    
    
    

Embed on website

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