1 0 1 0 1 0
0 1 0 1 0 1
1 0 1 0 1 0
::::::::::::
C++ Code:
int dem = 0; for(int i=0; i<n; ++i){ for(int j=0; j<n; ++j) if(dem %2 == 0){ if(j % 2 == 0) Array[i][j] = 0; else Array[i][j] = 1; } else{ if(j % 2 == 0) Array[i][j] = 1; else Array[i][j] = 0; } dem ++; }
bạn coi thử thế nào mình chưa chạy thử.