int ft_iterative_power(int nb, int power)
{
int res_int;
res_int = 1;
if (power < 0)
return (0);
else
{
while (power > 0)
{
res_int = nb * res_int;
power--;
}
return (res_int);
}
}
#include <stdio.h>
int main(void)
{
printf("%d", ft_iterative_power(4,3));
return (0);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: