parity of numbers by smk

int main(){\x0d
\x09int i,p,mask;\x0d
\x09for(i = 0;i < 256;i++){\x0d
\x09\x09p = 0;\x0d
\x09\x09for(mask=128;mask;mask/=2){\x0d
\x09\x09\x09if(i&mask){p++;}\x0d
\x09\x09}\x0d
\x09\x09printf("%d",!!(p%2));\x0d
\x09}\x09\x09\x09\x0d
}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page