Technicalsymposium



Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link


Enter Your Email :

raising 2 to the power of n

void main()
{
int pow(int);
int n,p;
clrscr();
printf("\n\n\t\tFINDING 2^N\n\n");
printf("\t\tEnter the Number : ");
scanf("%d",&n);
p=pow(n);
printf("\n\tpow(2,%d) = %d ",n,p);
getch();
}
int pow(int n)
{
if(n==0)
return 1;
else
return(pow(n-1)+pow(n-1));
}

 


All Programming Codes/Onlie Training/ Lab Manuals Download