JAVA
Posted: Fri Apr 29, 2022 8:03 am
JAVA
Exponents are a way of writing that a value is to be multiplied by itself a number of times. For example, 31 = 3, 32 = 3 *3,33 = 3 *3 *3, 34 = 3 *3*3*3, etc. Write a recursive method that computes the mth power of y(i.e. ym), that is based on multiplication. Assume m is a non-negative integer. (2 marks)
Exponents are a way of writing that a value is to be multiplied by itself a number of times. For example, 31 = 3, 32 = 3 *3,33 = 3 *3 *3, 34 = 3 *3*3*3, etc. Write a recursive method that computes the mth power of y(i.e. ym), that is based on multiplication. Assume m is a non-negative integer. (2 marks)