discrete mathematics - How to write psuedocode to compute n!!(double factorial) recursively? -
n!!= 1*3*...*n, if n odd. n!!= 2*4*...*n, if n even.
i've been trying, i'm having tough time starting problem.
if n = 1, n!! = 1 if n = 2, n!! = 2 else n!! = n * (n-2)!!
Comments
Post a Comment