Thursday, June 15, 2006

how to find give no is 2 power of n

f=( ( no & ( no-1 ) ) == 0 )

if( f == 1)
printf( "The Given Number is Power of %d", no );
else
printf( "The Given Number is not Power of %d", no );

No comments: