Corrected the logic in the power function where it incorrectly handled the case when num2 == 0. The function was originally set to abort when the exponent was zero.
Updated the logic so that when num2 == 0, the function correctly returns 1, since any number raised to the power of zero should always equal one.
num2 == 0
. The function was originally set to abort when the exponent was zero.num2 == 0
, the function correctly returns1
, since any number raised to the power of zero should always equal one.