double Power(double base, int exponent) { double res=1; for(int i=0;i<(exponent>0?exponent:-exponent);i++) res*=base; if(exponent>0) return res; else return 1/res; }