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