know the personalities
hold your mouse,move left and right

Raising 2 to the power of n

Technicalsymposium.com-Receive Latest Updates through Facebook-Like us Below

/* 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));
}

Hosting by Yahoo!

About-Us    Contact-Us    Site-map

©copyright 2009 All rights are reserved to technicalsymposium.com