show factorial equation
This commit is contained in:
@@ -141,18 +141,18 @@ for (int j=i; j<n; ++j)
|
|||||||
|
|
||||||
## 7.10 Recursive Definitions of Factorials and Integer Exponentiation
|
## 7.10 Recursive Definitions of Factorials and Integer Exponentiation
|
||||||
|
|
||||||
Factorial is defined for non-negative integers as:
|
- Factorial is defined for non-negative integers as:
|
||||||
n! = (
|

|
||||||
n · (n − 1)! n > 0
|
|
||||||
1 n == 0
|
- Computing integer powers is defined as:
|
||||||
Computing integer powers is defined as:
|
|
||||||
n
|
n
|
||||||
p =
|
p =
|
||||||
(
|
(
|
||||||
n · n
|
n · n
|
||||||
p−1 p > 0
|
p−1 p > 0
|
||||||
1 p == 0
|
1 p == 0
|
||||||
These are both examples of recursive definitions
|
|
||||||
|
These are both examples of recursive definitions
|
||||||
|
|
||||||
## 7.11 Recursive C++ Functions
|
## 7.11 Recursive C++ Functions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user