本题要求实现一个计算xn(n≥0)的函数。
函数接口定义:
double mypow( double x, int n );
函数mypow应返回x的n次幂的值。题目保证结果在双精度范围内。
裁判测试程序样例:
double mypow( double x, int n );
int main()
{
double x;
int n;
scanf("%lf %d", &x, &n);
printf("%fn", mypow(x, n));
return 0;
}
输入样例:
0.24 4
0.24 4
结尾无空行
输出样例:
0.003318
结尾无空行
#includedouble mypow( double x, int n ) { double s=1; for(int i=0;i



