#include <stdio.h>

int ft_recursive_power(int nb, int power)
{
	if (power < 0)
		return 0;
	if (power == 0)
		return 1;
	if (nb == 0 && power == 0)
		return 1;
	if (power == 1)
		return nb;

	return nb * ft_recursive_power(nb, power - 1);
}

int main()
{
	printf("%d", ft_recursive_power(3, 0));
}

Embed on website

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