0 LIKES LikeUnLike
Consider the following iterative method powerOfTwo, which uses repetitive multiplication for calculating the value of 2 to the power of n, where n is a positive integer number. int powerOfTwo(int n) { int result = 1; while (n > 0) { result *= 2; n-- ; } return result;}Implement the recursive version of the method powerOfTwo.
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 1 answers.