Gray code by letter

v,w,i;main(n){for(gets(&n);i^1<<~-printf(i?"\n%0*o":"Gray code  n=%d",n%8,w^=v*v*v);v=i&-i++);}

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

download

return to the top page