We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 769b3c7 commit 94202ecCopy full SHA for 94202ec
math/factorial.cpp
@@ -27,7 +27,7 @@ namespace math {
27
* cannot be represented in 64 bit unsigned int
28
*/
29
uint64_t factorial(uint8_t n) {
30
- if (n < 20) {
+ if (n > 20) {
31
throw std::invalid_argument("maximum value is 20\n");
32
}
33
if (n == 0) {
0 commit comments