//CS5-HMC-Sp.,00-Lab 4 //A. Khakpour, Mar., 00 import java.io.*; class Graph3 { public static void main (String args[]) throws IOException { BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in)); int x, y; System.out.println("Enter X (1-10, or -1 to quit): "); x = Integer.parseInt (stdin.readLine()); System.out.println("Enter Y (1-10, or -1 to quit): "); y = Integer.parseInt (stdin.readLine()); while (x != -1 && y != -1) { System.out.println ("\t1234567890"); for (int row=1; row <= 10; row++) if (y == row) { System.out.print (row + ":\t"); for (int column=1; column <= 10; column++) if(x == column) System.out.print('X'); else System.out.print(' '); System.out.println(); } else System.out.println(row + ":"); System.out.println("Enter X (1-10, or -1 to quit): "); x = Integer.parseInt (stdin.readLine()); System.out.println("Enter Y (1-10, or -1 to quit): "); y = Integer.parseInt (stdin.readLine()); } } }