Skip to content

Commit 7548b13

Browse files
authored
Updated last return in is_factorial
1 parent d7bc8d0 commit 7548b13

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

math/check_factorial.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ bool is_factorial(uint64_t n) {
4444
* if n was the sum of a factorial then it should be divided until it
4545
* becomes 1
4646
*/
47-
if (n == 1) {
48-
return true;
49-
} else {
50-
return false;
51-
}
47+
return (n == 1)
5248
}
5349
} // namespace math
5450

0 commit comments

Comments
 (0)