This commit is contained in:
Camille Chauvet
2023-05-17 16:45:25 +00:00
commit 29ed24d567
619 changed files with 16119 additions and 0 deletions

View File

@ -0,0 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_recursive_power.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lflandri <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/20 16:44:43 by lflandri #+# #+# */
/* Updated: 2022/07/20 16:44:44 by lflandri ### ########.fr */
/* */
/* ************************************************************************** */
int ft_recursive_power(int nb, int p)
{
if (p > 0)
return (nb * ft_recursive_power(nb, p - 1));
if (p == 0)
return (1);
return (0);
}