#include<stdio.h>
int anik(int n, int m)
{
if(m == 0)
{
return 1;
}
else
{
return n*anik(n,m-1);
}
}
int main()
{
int a, b, sum;
printf("Enter Base and Power : ");
scanf("%d %d", &a, &b);
sum = anik(a, b);
printf("\n%d to the power %d is : %d\n", a, b, sum);
return 0;
}
int anik(int n, int m)
{
if(m == 0)
{
return 1;
}
else
{
return n*anik(n,m-1);
}
}
int main()
{
int a, b, sum;
printf("Enter Base and Power : ");
scanf("%d %d", &a, &b);
sum = anik(a, b);
printf("\n%d to the power %d is : %d\n", a, b, sum);
return 0;
}
Comments
Post a Comment