math.h库里有这个函数,pow(x,n),也可以自己用循环来写long fun(int x,int n){ long p=1; int i; for (i=1;i<=n;i++) p*=x;return p;}在主函数main()中,直接调用fun函数即可
用库函数,pow(x,y)