分类: 信息化
2014-12-19 14:27:08
#include
double pow(double x,int n)
{
int i;
double sum;
sum=1;
for(i=0;i
sum=sum*x;
}
return sum;
}
int main()
{
double num;
int n;
scanf("%lf%d",&num, &n);
printf("%.2lf\n", pow(num,n));
return 0;
}
如图: