x,y,z;main(n){for(gets(&n);x<1<<printf(x?"\n%0*o":"Gray code n=%d",n%8,z^=y*y*y)-1;)y=x&-x++;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page