/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_factorial.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: ana-lda- <ana-lda-@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/06/26 14:50:09 by ana-lda- #+# #+# */ /* Updated: 2024/06/26 14:50:48 by ana-lda- ### ########.fr */ /* */ /* ************************************************************************** */ int ft_recursive_factorial(int nb) { if (nb < 0) return (0); if (nb == 0 || nb == 1) return (1); return (nb * (ft_recursive_factorial(nb - 1))); } /* #include <stdio.h> int main(void) { printf("%d", ft_recursive_factorial(0)); }*/