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