import strutilsconst n = 3echo "n=", nfor i in 0..<1 shl n: echo toBin(i xor (i shr 1),n)
Standard input is empty
n=3 000 001 011 010 110 111 101 100
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!