main(i,j,k){scanf("%d",&i);printf("Gray code n=%d\n",i);for(j=0;j<1<<i;puts(""),j++)for(k=1<<i;k>>=1;putchar(k&(j/2^j)?49:48));}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page