AP Computer Science A Question of the Day

Daily challenge for AP Computer Science A. Test yourself and track progress.

Consider the following code:

public static void main(String<u></u> args) {

System.out.println(equation(8));

}

public static int equation(int a) {

if(a <= 5) {

return 12;

}

return equation(a-2) * equation(a-1);

}

What is the output for the code above?

Select an answer and click Check.