#include <stdio.h>
int ft_iterative_power(int nb, int power)
{
int i = nb;
while (power > 1)
{
i = i * nb;
power--;
}
return (i);
}
int main() {
printf("%d\n", ft_iterative_power(5, 2));
return 0;
}
To embed this program on your website, copy the following code and paste it into your website's HTML: