已经调试完成,请采纳:
#include<stdio.h>
double fun(int n,double x); //加了此行,否则要把fun函数移到main函数之前
void main()
{ double x, root;
int n;
printf("Input x,n:");
scanf("%lf%d",&x,&n);
root=fun(n,x);
printf("Root=%.2f\n",root);
} /*调试时设置断点*/
double fun(int n,double x)
{ if(n==0) //这里改了
return 1;
else
return x*fun(n-1,x);
}

