fib.mj 263 Bytes
Newer Older
uwgwb's avatar
uwgwb committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
class Fib {
    public int fib(int n) {
        if(n < 2) {
            return n;
        }
        return fib(n - 1) + fib(n - 2);
    }

    public static void main(String[] args) {
        Fib fib = new Fib();
        System.out.println(fib.fib(24));
    }


}