/*
int	ft_recursive_factorial(int nb)
{
	if (nb < 0)
		return (0);
	else if (nb <= 1)
		return (1);
	else
		return (nb * ft_recursive_factorial(nb -1)); // sens ne change pas meme resultat
}
*/

int	ft_recursive_factorial(int nb)
{
	if (nb < 0)
		return (0);
	else if (nb <= 1)
		return (1);
	else
		return (ft_recursive_factorial(nb -1) * nb);
}


#include <stdio.h>
int	main(void)
{
	printf("%d", ft_recursive_factorial(6));
			return (0);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: