Top Posters
Since Sunday
k
3
r
3
j
3
V
3
l
3
2
J
2
1
2
n
2
O
2
h
2
d
2
New Topic  
Izzy122 Izzy122
wrote...
Posts: 437
4 years ago
Fill in the code to complete the following method for computing factorial.

/** Return the factorial for a specified index */
public static long factorial(int n) {
if (n == 0) // Base case
return 1;
else
return ________; // Recursive call
}


▸ n * factorial(n - 1)

▸ n * (n - 1)

▸ factorial(n - 1) * n

▸ n
Textbook 
Introduction to Java Programming, Comprehensive Version

Introduction to Java Programming, Comprehensive Version


Edition: 10th
Author:
Read 33 times
1 Reply
Replies
Answer verified by a subject expert
Kutthroat K.Kutthroat K.
wrote...
Posts: 405
4 years ago
Sign in or Sign up in seconds to unlock everything for free
More solutions for this book are available here
1

Related Topics

Izzy122 Author
wrote...

4 years ago
Good timing, thanks!
wrote...

Yesterday
This calls for a celebration Person Raising Both Hands in Celebration
wrote...

2 hours ago
Brilliant
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  1011 People Browsing
 110 Signed Up Today
Related Images
  
 333
  
 2551
  
 99
Your Opinion
Who will win the 2024 president election?
Votes: 8
Closes: November 4