program to find power of a number through recursion
Answers
Answered by
1
Answer:
Hello good evening
I hope it help you
Attachments:
![](https://hi-static.z-dn.net/files/d2c/6cc2a5011a0f5ce9caa455f2a64fbe59.jpg)
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
Science,
3 months ago
Math,
3 months ago
Math,
6 months ago
Chemistry,
6 months ago
India Languages,
1 year ago