SHARE
TWEET

Fuuuuuuuuuuuuck

a guest Oct 15th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.      int[][] chessTable = new int[20][20];
  5.      
  6.      boolean chetnRow = false;
  7.         int accCol =3;
  8.      for (int i =0; i < 20; i++) {
  9.          int ONE_NUM;
  10.          int TWO_NUM;
  11.          if (accCol !=0){
  12.              accCol--;
  13.              ONE_NUM = 1;
  14.              TWO_NUM = 0;
  15.  
  16.          }
  17.          else {
  18.              accCol =3;
  19.              chetnRow =!chetnRow;
  20.              ONE_NUM = 0;
  21.              TWO_NUM = 1;
  22.              //System.out.println("nechetn chisl");
  23.          }
  24.          int acc = 4;
  25.          //boolean chetnRow = false;
  26.          for (int j = 0; j < 20; j++){
  27.              if (acc != 0) {
  28.                  chessTable[i][j] = chetnRow ? ONE_NUM : TWO_NUM;
  29.                  acc--;
  30.              }
  31.              else {
  32.                  acc = 3;
  33.                  chetnRow = !chetnRow;
  34.                  chessTable[i][j] = chetnRow ? ONE_NUM : TWO_NUM;
  35.              }
  36.  
  37.             System.out.print(" " + chessTable[i][j]);
  38.  
  39.          }
  40.          System.out.println("");
  41.  
  42.          }
  43.          //System.out.print(chessTable[i][j]);
  44.      }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top