//exp must be positive
int pow(int base, int exp){
int result = base;
while(exp > 1){
result = result * base
--exp;
}
return result;
}
The function is being used to calculate the value of the exponent.
The function begins with function pow(base, exp), but I don't know how to finish writing it. it is supposed to calculate to that 4 raised to the 3rd power equals 64