#include <stdio.h>
double calc_pow( double x, int n );
int main()
{
double x;
int n;
scanf("%lf %d", &x, &n);
printf("%.0f\n", calc_pow(x, n));
return 0;
}
double calc_pow( double x, int n )
{
double b=1;
if(n==1)b=x;
else if(n>1)b=x*calc_pow(x,n-1);
else return 0;
return b;
}
来源:CSDN
作者:weixin_45810623
链接:https://blog.csdn.net/weixin_45810623/article/details/103742723