0

Can anyone help me debug this, I am getting a lot of errors. :(

here's the example case:

User inputs..

Enter Row: 3
Enter Column: 3

Output

1 2 3
2 4 6
3 6 9

Here's my code:

import java.io.*;
public class Test2 
{
public static InputStreamReader reader=new 
InputStreamReader (system.in);
public static BufferedReader input=new 
BufferedReader (reader);
public static void main (String args[]) throws Exception{
	String row;
	String col;
	
System.out.println ("Enter Row:");
row = input.readLine();
System.out.println ("Enter Column:");
col = input.readLine();

int [][] x = {{0,1,2,3,4,5,6,7,8,9,10},
	          {1,2,4,6,8,10,12,14,16,18,20},
		  {2,3,6,9,12,15,18,21,24,27,30},
		  {3,4,8,12,16,20,24,28,32,36,40},
		  {4,5,10,15,20,25,30,35,40,45,50},
		  {5,6,12,18,24,30,36,42,48,54,60},
		  {6,7,14,21,28,35,42,49,56,63,70},
		  (7,8,16,24,32,40,48,56,64,72,80),
		  {8,9,18,27,36,45,54,63,72,81,90},
		  {9,10,20,30,40,50,60,70,80,90,100},
		  {10,20,30,40,50,60,70,80,90,100,110}};

int row, col;
for (row=0; row<11; row++){
for (col=0; col<11; col++){
System.out.print (" " + x [row][col]);
}
System.out.println();
}
}
}
2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by iCez
0

The compiler gives you more information than just "errors".

Post the errors and what you think might be the reason for them. You need to learn how to interpret those messages and deal with the cause. Throwing up your hands and saying "I have errors!" won't get you too far.

0

yeah.. xD I just finished fixing it. I found out that there are some mistakes in symbols and somebody taught me some lacking statements.

thx for the reply. :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.