Está en la página 1de 1

BufferedReader a = new BufferedReader (new InputStreamReader (System.

in));
try{
char mat[][] = new char [3][3];
int i,j,d,s;

System.out.println("-----------");
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
System.out.print(mat[i][j]+" | ");
}
System.out.println("");
System.out.println("-----------");
}
System.out.println("");
System.out.print("Digite posicion de fila del tablero");
d = Integer.parseInt(a.readLine());
System.out.println("");
System.out.print("Digite posicion de columna del tablero");
s = Integer.parseInt (a.readLine());
System.out.println("");
for (i = 0; i <mat.length; i++) {
for (j = 0; j <mat[i].length; j++) {
System.out.print(mat[i][j]+" X ");
}
System.out.println("");
System.out.println("-----------");
}
}catch (Exception e){
}

mat[0][0]= 1;
mat[0][1]=
mat[0][2]=
mat[1][0]=
mat[1][1]=
mat[1][2]=
mat[2][0]=
mat[2][1]=
mat[2][2]=

2;
3;
4;
5;
6;
7;
8;
9;

También podría gustarte