Question: 1. Write a recursive method expFive(n) to compute y=5^n. For instance, if nis 0, y is 1. If n is 3, then y is 125.
1. Write a recursive method expFive(n) to compute y=5^n. For instance, if nis 0, y is 1. If n is 3, then y is 125. If n is 4, then y is 625. The recursive method cannot have loops. Then write a testing program to call the recursive method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
