#include
float cube(float x,int n);
{
if(n==1)
return x;
else
return x*cube(x,n-1)
}
int main()
{
float x,y;
int n;
printf("Please input x:\n");
scanf("%f,%d",&x,&n);
y=cube(x,n);
printf("%6.2f",y);
return 0;
}
#include"stdio.h" double fun(double x,int n) { if(n==0) return 1; else return x*fun(x,n-1); }
main() { int n; double x; printf("输入x和n:"); scanf("%lf%d",&x,&n); printf("%lf\n",fun(x,n)); }