Gray code by primo(<_<)

<?="Gray code  n=",$n=fgetc(STDIN);for(;$i>>$n<1;)printf("
%0$n".b,$i/2^$i++);

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

download

return to the top page