home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Point Programming 1
/
PPROG1.ISO
/
c
/
snippets
/
ispow2.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1994-04-03
|
233 b
|
13 lines
#include <stdio.h>
int another_function(int x) { return! ((~(~0U>>1)|x)&x -1) ;}
int main(void)
{
int i;
for (i = 0; i < 256; ++i)
printf("%3d: %d\n", i, another_function(i));
return 0;
}