Gray code by chocobi

b,c=2396745;main(a){for(printf("Gray code  n=%d",a=getchar()&7);b<1<<a*3;b=-c+b&c)printf("\n%0*o",a,b^b/8);}

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

download

return to the top page