Gray code by eagletmt

i;n;main(m){n||printf("Gray code  n=%d\n",n=7&getchar());for(m=n;~--m;putchar(48|1&(i^i/2)>>m));++i>>n||main(puts(""));}

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

download

return to the top page