Gray code by test

k;a;main(i,n){for(printf("Gray code  n=%d",n=~n%9);a>>n<1;putchar(!k?a^=--i&-i,k=n,10:a>>--k&1|48));}

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

download

return to the top page