- #1
shermaine80
- 30
- 0
write recursive code for the following integer function:
power(x,n) is the exponential or power function x^n, where n is the exponent
For example: power(3,4) evaluates 3^4 which is 3 x 3 x 3 x 3 = 81
Expect the integer result to be large(ie in the millions)
explain how recursive code works.
Please help me how to write this code.
Thanks.
power(x,n) is the exponential or power function x^n, where n is the exponent
For example: power(3,4) evaluates 3^4 which is 3 x 3 x 3 x 3 = 81
Expect the integer result to be large(ie in the millions)
explain how recursive code works.
Please help me how to write this code.
Thanks.