9 lines
144 B
R
9 lines
144 B
R
#x is Input
|
|
#n is Factorial Number
|
|
multifactorial=function(x,n){
|
|
if(x<=n+1){
|
|
return(x)
|
|
}else{
|
|
return(x*multifactorial(x-n,n))
|
|
}
|
|
}
|