Skip to content

Commit

Permalink
Merge branch 'master' into annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
realstealthninja authored Nov 24, 2024
2 parents 376fc65 + 94202ec commit b598d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion math/factorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace math {
* cannot be represented in 64 bit unsigned int
*/
uint64_t factorial(uint8_t n) {
if (n < 20) {
if (n > 20) {
throw std::invalid_argument("maximum value is 20\n");
}
if (n == 0) {
Expand Down

0 comments on commit b598d00

Please sign in to comment.