[Blindmath] Bases, exponents, and recursion
Andy B.
sonfire11 at gmail.com
Sun Sep 8 21:01:51 UTC 2013
I have what most likely is a simple problem. However, it is quite
complicated to figure out. I have the following problem I have to solve:
Create a function called power that takes a base and exponent as the
arguments, then returns a base exponent. For example, power(2,5)= 2*2*2*2*2.
In the recursion step, use the relationship:
Base exponent=base*base exponent-1
I am totally confused. What exactly is a base exponent?
The sample that I have used 6! As an example, but it doesn't seem to help
when trying to figure out the power of a number through recursion. I assume
the example wants something like this:
Power(2,5)=
Recursion steps:
Exponent = result
1=2
2=4
3=8
4=16
5=32
More information about the BlindMath
mailing list