#include<iostream>
int main()
{
using namespace std;
double x,n,y;
y = 1;
double xn(double x,double n,double y);
cout<<"请输入 x 和 n : ";
cin >> x >> n;
cout << endl
<< "x 的 n 次幂为 :"
<< xn(x,n,y);
}
double xn (double x,double n,double y)
{
y *= x;
if ( --n > 0 )
return xn(x,n,y);
//xn(x,n,y)
else return y;
}