#include<iostream.h>
#include<conio.h>
int main()
{
int power(int, int);
int n, p, result;
clrscr();
cout<<"Enter the number : ";
cin>>n;
cout<<"Enter the power : ";
cin>>p;
result=power(n,p);
cout<<" The result of "<<n<<" to power "<<p<<" is "<<result;
getch();
return 0;
}
int power(int x, int y)
{
static int r=1;
if(y==0)
{
return 1;
}
else
{
r=r*x;
power(x, y-1);
}
return r;
}