pow
Jump to navigation
Jump to search
This function computes n-th power of x.
function int pow (int x, int n) { int y = 1; while (n-- > 0) y *= x; return y; }