From 670431de6dac15df2c97b46d96df6e5a589e23d6 Mon Sep 17 00:00:00 2001 From: Hendrik Sitzmann Date: Thu, 8 Feb 2024 06:12:07 +0100 Subject: [PATCH] refactoring: added comments to main --- src/fakultaet/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fakultaet/main.c b/src/fakultaet/main.c index 112c8a7..5de7643 100644 --- a/src/fakultaet/main.c +++ b/src/fakultaet/main.c @@ -3,12 +3,14 @@ #include int main() { + // minInput is set to 0 so there won't be any negative numbers int minInput = 0; printf("Enter a number to calculate its factorial: \n"); int number = usergetd("Enter an even number: "), minInput, NULL); int result = fakultaet(number); + // result now has the factorial of the user input printf("The factorial of %d is: %d\n", number, result);