55
loading...
This website collects cookies to deliver better user experience
float __pow_recursion(float x, float y)
{
if (y == 0)
return (1);
if (y < 0)
return (_pow_recursion(x, y + 1) / x);
return (_pow_recursion(x, y - 1) * x);
}
float __pow_recursion(float x, float y) /*__pow_recursion(5, 0)*/
{
if (y == 0) /*true*/
return (1); /*our return is 1*/
if (y < 0)
return (_pow_recursion(x, y + 1) / x);
return (_pow_recursion(x, y - 1) * x);
}