|If you can use the pow function, then use it.|
double pow(double base, double exp);
If you can't use the function then write your own using the pow function above as a reference. Hint: initialize a variable to 1 and then multiply it by the base for exp number of times.
In fact, it would probably be a good idea to use the pow function to verify that your function is returning the right answer.