I have an assignment about the Power operation and heres how it goes,
The power operation is defined as repeated multiplication of the same factor. For example, 9 power 2 is 9 × 9 = 81, and 3 power 5 is 3 × 3 × 3 × 3 × 3 = 243.
More generally, we have X power Y, where X is called the base, and Y is called the exponent. Exponent corresponds to the number of times the base is used as a factor. My goal is to repeatedly use the Multiply subroutine to implement a subroutine for power? Any idea how?
The power operation is defined as repeated multiplication of the same factor. For example, 9 power 2 is 9 × 9 = 81, and 3 power 5 is 3 × 3 × 3 × 3 × 3 = 243.
More generally, we have X power Y, where X is called the base, and Y is called the exponent. Exponent corresponds to the number of times the base is used as a factor. My goal is to repeatedly use the Multiply subroutine to implement a subroutine for power? Any idea how?