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

fibo40int.java (227B)


      1 class fibo40int {
      2 
      3     final static int fibo(int n) {
      4         if(n < 3) return n;
      5         else return fibo(n - 1) + fibo(n - 2);
      6     }
      7 
      8     public static void main(String args[]) {
      9         System.out.println(fibo(40));
     10     }
     11 }