I am trying to generate a simple multiplication table, at this point (I am not worried about all the spaces between the numbers), I required to do this using three nested for loops. I have done this using two loops, but I need to use a third one. All i got my code to do using three is print out the first row of numbers, and the first column, but i could not figure out the third loop with the actual values of the numbers being multiplied. Does anybody know if im doing something wrong with the nesting of the loops or is it something else..?



-----------------------------------------------------------
class multiplication{
public static void main(String[]args){
int j;//horizontal numbers
int i;//vertical numbers
System.out.println("\n\tMultiplication Table\n");
System.out.print(" ");
for(j=1;j<=12;j++){
System.out.print(" "+j);//Prints First line of horizontal numbers
}
System.out.println();
for(i=1;i<=12;i++){
System.out.println(" "+i);
}
for(i=i;i<12;i++){
System.out.print(" "+j*i);
}
}