Skip to content

Commit b598d00

Browse files
Merge branch 'master' into annotations
2 parents 376fc65 + 94202ec commit b598d00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

math/factorial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace math {
2727
* cannot be represented in 64 bit unsigned int
2828
*/
2929
uint64_t factorial(uint8_t n) {
30-
if (n < 20) {
30+
if (n > 20) {
3131
throw std::invalid_argument("maximum value is 20\n");
3232
}
3333
if (n == 0) {

0 commit comments

Comments
 (0)