> I need help writing a simple while loop for this function?

I need help writing a simple while loop for this function?

Posted at: 2014-12-18 
his funtion for positive "exp" only if you want for negative to add a simple if statement.

//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