Answer the question
In order to leave comments, you need to log in
How to fill an array with binary CC numbers in order?
It is necessary to fill a two-dimensional array with six-bit numbers of the binary number system in order, starting from 0. Each bit of the number must be a separate element of the "internal array."
To end up with an array like this:
Answer the question
In order to leave comments, you need to log in
Well, for example like this
var ot [64][6]int
for i := 0; i < 64; i++ {
for j := 0; j < 6; j++ {
ot[i][5-j] = (i >> j) % 2
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question