Thursday, May 28, 2015

L Question: Integral base 2 logN

int log2(int a)
{
int n=0;
while(a>;1)
{
a>>=1;
n++;
}
return n;
}

No comments:

Post a Comment