#include <stdio.h>
int ft_iterative_factorial(int nb)
{
int i;
int ans;
i = 1;
ans = 1;
while(i <= nb)
{
ans = ans * i;
i++;
}
return ans;
}
int main() {
printf("Factorial 33! = %d\n", ft_iterative_factorial(33));
printf("Factorial 3! = %d\n", ft_iterative_factorial(3));
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: