Teacher gave a question today to find Base is 2 and power is 3. so that Answer should be 8. so to find that she told us to use Recursion and do it. i done it in the normal way. but when i do it in the Recursion way. one error coming saying too Few Parameters
please check
#include<stdio.h>
int multi(int,int);
main()
{
int x=0,y=0;
printf("Enter Your Base Number:");
scanf("%d",&x);
printf("Enter the Power Number:");
scanf("%d",&y);
printf("The power of %d is %d",x,multi(x,y));
}
int multi (int x, int y)
{
int ans=0;
if(y<=1)
return 1;
else
{
ans=(x*multi(x,y-1));
return ans;
}
}
PLEASE HELP ME IN THIS