Quote:
import java.util.*;
public class puzzle{
final static int MAX_ROW = 8;
final static int MAX_COL = 4;
static int numRow;
static int grid[][] = new int[MAX_ROW][MAX_COL];
public static void main(String[] args){
System.out.println(" Enter the number of row:");
Scanner myScanner = new Scanner(System.in);
numRow = myScanner.nextInt();
for(int i = 0; i < numRow; i++)
{
for (int j = 0; j < MAX_COL; j++)
{
System.out.print(grid[i][j]);
}
System.out.println();
}
}
}
|
m writing a code to display the tic-tae-toe board but when i run the code the display show only 0 . Can someone help me which part of my code went wrong?? thkx in advance.