top of page
APCSAaday.com

public int result (int n)
{
if (n == 1)
return 2;
else
return 2 * result(n-1);
}
What value does result(5) return?
A) 64
B) 32
C) 16
D) 8
E) 2
What is your answer, don't forget to check the explanation at the bottom!
A
B
C
D
Related Posts
Comments
Share Your ThoughtsBe the first to write a comment.
bottom of page