program to find power of a number through recursion
Answers
Answered by
1
Answer:
Hello good evening
I hope it help you
Attachments:
Answered by
6
First give a meaningful name to our recursive function say pow() .
The function must accept two numbers i.e. base and exponent and calculate its power.
Hence, take two parameters for base and exponent, say pow(double base, int exponent);
Finally the function should return base ^ exponent i.e. a double type value.
Khadijah21
Similar questions