Your second method of coding it only calls another method. It doesn't do anything.
Type: Posts; User: Norm
Your second method of coding it only calls another method. It doesn't do anything.
First suggestion, use a new variable to hold the results, don't reuse num.
You need a loop where you multiply the result by num while using the value of power to control the number of times thru the...
How would you do it manually?
For example:
if power = 1 return the number.
Mult the number by itself
if power = 2 return the product
otherwise mult the above result by the number
incr the...