#include <stdio.h>

int fib(int n){
    if (n==0) return 0;
    else  if(n==1) return 1;
    else return(fib(n-1)+fib(n-2));
}




int main() {
    int c;
    printf("veuillez entrer la suite de fibonacci que vous souhaitez calculer\n");
    scanf("%d",&c);
    printf("fib (%d)=%d\n",c,fib(c));
    return 0;
}

Embed on website

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