Create and print a tic-tac-toe board
You don't need array b.  Try this.

    for (int i = 0; i &lt; 9; i += 3) {
        System.out.println("+---+---+---+");
        for (int j = i; j &lt; i + 3; ++j)
            System.out.printf("| %s ", a[j] == 10 ? "O" : a[j] == 100 ? "X" : " ");
        System.out.println("|");
    }
    System.out.println("+---+---+---+");