#include <unistd.h>
#include <stdio.h>

int	ft_recursive_power(int nb, int power)
{
	if (power < 0)
		return (0);
	if (power == 0)
		return (1);
	
	return (nb * ft_recursive_power(nb, power -1));
}

int	main(void)
{
	printf("%d\n", ft_recursive_power(2, 4));
	return (0);
}

Embed on website

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