Gray code by pooq

input""n
?"Gray code  n=",n
for i=0to 2^n-1?mid$(bin$(2^n+xor(i,i/2)),2)next

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

download

return to the top page