I am new to C++ and have been trying to understand the function below, I need a step by step of what it is actually doing, its a function that takes a BASE and a power it works but wish to know how exactly it works. I can do base calculation off the top of my head but this is a little different.
printf("Enter the numbers:base and power\n");
printf("The ans is: %d\n",ans);
int pw(int x,int n)
for(i=3; i<=n; i++)