bench-fibo

Unnamed repository; edit this file 'description' to name the repository.
git clone https://logand.com/git/bench-fibo.git/
Log | Files | Refs | README

fibo40.c (166B)


      1 #include <stdio.h>
      2 
      3 static int fibo(int n) {
      4   if(n < 3) return n;
      5   else return fibo(n - 1) + fibo(n - 2);
      6 }
      7 
      8 int main() {
      9   printf("%d\n", fibo(40));
     10   return 0;
     11 }