Gray code by murky-satyr

i,j;main(n){for(printf("Gray code  n=%d",n=getchar()&7);i^1<<n;++i)for(j=n+1;j;)putchar(--j-n?-(i>>j)>>1&1|48:10);}

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

download

return to the top page