الرجوع
تسجيل الدخول

What is the output of the following code?

public int test(int n) {
    if (n <= 1)
        return n;
    else
        return test(n - 1) + test(n - 2);
}

Assume the method is called with test(5).