Gray code by kinaba

puts"Gray code  n=#{N=getc&7}",(0...1<<N).map{|v|"%0*b"%[N,v^v/2]}

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

download

return top