class Solution {
public:
double Power(double base, int exponent) {
double resl = base;
if(exponent>0){
for(int i=0; i<exponent-1; i){
resl = base * resl;
}
return resl;
}
else if(exponent == 0){
return 1;
}
else if(exponent<0){
int res=exponent*(-1);
for(int i=0; i<res-1; i){
resl = base * resl;
}
return 1/resl;
}
}
};
//菜鸡报道