id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

simona1@sfusd.edu recursion2 > doubleFactorial
prev  |  next  |  chance

The double factorial of an odd positive integer n is the product of all the odd integers up to that integer. The sequence of double factorials for n = 1, 3, 5, 7, 9, 11, 13 ... is 1, 3, 15, 105, 945, 10395, 135135,... Note that n will always be an odd number.


doubleFactorial(1) → 1
doubleFactorial(3) → 3
doubleFactorial(5) → 15

...Save, Compile, Run (ctrl-enter)

public int doubleFactorial(int n){ }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 291

Copyright Nick Parlante 2017 - privacy