#include<stdio.h>
#include<conio.h>
long int power(int a,int b)
{
long int s=1;
int I;
if(b==0)
{
return 0;
}
for(i=1;i<=b;i++)
{
s=s*a;
}
return s;
}
void main()
{
long int p;
int c,d;
printf(“Enter any two number\n”);
scanf(“%d%d”,&c,&d);
p=power(c,d);
printf(“\n power is %d”,p);
getch();
}
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer