|
@ -5,9 +5,9 @@ |
|
|
int main() { |
|
|
int main() { |
|
|
// minInput is set to 0 so there won't be any negative numbers |
|
|
// minInput is set to 0 so there won't be any negative numbers |
|
|
int minInput = 0; |
|
|
int minInput = 0; |
|
|
|
|
|
int maxInput = 12; |
|
|
|
|
|
|
|
|
printf("Enter a number to calculate its factorial: \n"); |
|
|
|
|
|
int number = usergetd("Enter an even number: "), minInput, NULL); |
|
|
|
|
|
|
|
|
int number = usergetd("Enter a positive number below 13: "), minInput, maxInput); |
|
|
|
|
|
|
|
|
int result = fakultaet(number); |
|
|
int result = fakultaet(number); |
|
|
// result now has the factorial of the user input |
|
|
// result now has the factorial of the user input |
|
|