Help with class. Power Functions

Write a function called Power that takes 2 numbers as arguments.
It returns the first number raised to the power the second number.
So for example:
If it gets 1 and 6 as arguments, it returns 1 because 1*1*1*1*1*1 = 1
If it has 2 and 3 as arguments returns 8 because 2*2*2 = 8.
So far this is what i have
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 int Power(int base, int exponent) {
 }
int main() {
cout << “ Enter base: ”;
int base;
cin >> base;
cout << “ Enter exponent:“;
int ex;
cin >> ex;
int ans = Power(base,ex);
cout << base << “ to the power “ << ex << “ = “ << ans << endl;
 
            system(“pause”);
}
There is a function within <cmath> called pow() that does this already. Is this some sort of assignment that you were asked to do?
Topic archived. No new replies allowed.