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

fibo40int2.java (232B)


      1 class fibo40int2 {
      2 
      3     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(new fibo40int2().fibo(40));
     10     }
     11 }