Please explain!

i know that this is for exponential power, can someone explain how its works.


for (int loopcount = 0; loopcount<myInt1;loopcount++)
{
power=power*myFlt1;
}
It repeatedly multiplies "power" by the value of "myFlt1".

The loop counts from 0 to myInt1 - 1, which is exactly myInt1 integers,
therefore the loop executes myInt1 times. Each time through it
multiplies power by myFlt1. Therefore the loop multiplies power by
myFlt1 myInt1 times.
Topic archived. No new replies allowed.