diff --git a/src/fakultaet/fakultaet.c b/src/fakultaet/fakultaet.c index 93273f6..b05b947 100644 --- a/src/fakultaet/fakultaet.c +++ b/src/fakultaet/fakultaet.c @@ -1,9 +1,11 @@ #include int fakultaet(int n) { + // Checking if the input is either zero or one if (n == 0 || n == 1) return 1; + // The result multiplies with i and i increases every turn until the loop ends int result = 1; for (int i = 2; i <= n; i++) { result *= i;