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 55ee441 commit cc8efbbCopy full SHA for cc8efbb
src/main/java/com/thealgorithms/maths/Factorial.java
@@ -9,7 +9,7 @@ public class Factorial {
9
*/
10
public static long factorial(int n) {
11
if (n < 0) {
12
- throw new IllegalArgumentException("Input number cannot be negative!");
+ throw new IllegalArgumentException("Input number cannot be negative");
13
}
14
long factorial = 1;
15
for (int i = 1; i <= n; ++i) {
0 commit comments