Comp103 - Java


12 x 12 times table table




public class TimesTable{
  
  public static void main(String[]args){
    
    int[][] table = new int[13][13];
    
    for (int row = 1; row < table.length; row++)
      for (int col = 1; col < table[row].length; col++)
      table[row][col] = row * col;
    
    for (int row = 1; row < table[row].length; row++){
      for (int col = 1; col < table[row].length; col++)
      System.out.print (table[row][col] + "\t");
    System.out.println();
  }
}
}