Power (loop)
C# Algorithms
while accumulation
Flowchart (ISO 5807)
Source code
class P {
static long Pow(int b, int e) {
long r = 1;
while (e > 0) {
r *= b;
e--;
}
return r;
}
} while accumulation
class P {
static long Pow(int b, int e) {
long r = 1;
while (e > 0) {
r *= b;
e--;
}
return r;
}
}