Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 years ago
189 B
20
Indexable
Never
int BinaryTable[N][M] = {{0}};
for (int i = 0; i < N; i++){
    int copy = i, j = M - 1;
    while (copy != 0){
        BinaryTable[i][j] = copy % 2;
        copy /= 2;
        j--;
    }
}