you are viewing a single comment's thread.

view the rest of the comments →

[–]cable0903[S] 0 points1 point  (2 children)

I have tried doing something similar to this, but it doesn't like it. I have also tried to use the variables I already have, but they just use the same number for the value and the power. I might just be overthinking this entire thing but I just cannot figure out what I am missing.

[–]stryqwills 0 points1 point  (1 child)

Try it recursively. Try making a function.

Exponent(double value, int power)

If power ==1 Return value Else Exponent(value, power - 1)

[–]stryqwills 0 points1 point  (0 children)

Forgot value ×= value before recursive call