Can Anybody help me out, in converting my code to iterative method.

Hello,

I am new on programming, is currently using dev c++. I was asked to write a method to find x^y, where y is a power of x. Using recursive and iterative solution. I already have the recursive one, but I don't know how to make it to iterative. Here is my recursive solution.

Code:

`#include<stdio.h>`

int power (int, int);

int main ()

{

int base, exp, result;

printf("Please enter a base number\n");

scanf("%d",&base);

printf("Please enter a exponent number\n");

scanf("%d",&exp);

result = power(base, exp);

printf("\n The result is:%d\n",result);

system("pause");

return 0;

}

int power (int base, int exp)

{

if(exp >= 1)

return base * (power(base,exp - 1));

else

return 1;

}

Help would highly be appreciated. Thanks in advance..