mirror of
https://hub.njuu.cf/TheAlgorithms/C-Plus-Plus.git
synced 2023-10-11 13:05:55 +08:00
Update double_factorial.cpp
This commit is contained in:
parent
2aaba721fb
commit
c4f3f915f8
@ -1,12 +1,9 @@
|
||||
#include <iostream>
|
||||
#include <cassert>
|
||||
|
||||
/* Double factorial of a non-negative integer n,
|
||||
is defined as the product of
|
||||
all the integers from 1 to n
|
||||
that have the same parity (odd or even) as n.
|
||||
It is also called as semifactorial
|
||||
of a number and is denoted by !! */
|
||||
/* Double factorial of a non-negative integer n, is defined as the product of
|
||||
all the integers from 1 to n that have the same parity (odd or even) as n.
|
||||
It is also called as semifactorial of a number and is denoted by !! */
|
||||
|
||||
uint64_t double_factorial_iterative(uint64_t n) {
|
||||
uint64_t res = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user