title: simple multiplication arrays in java
body: <p>I want to create a simple java program only with simple loops and arrays. It should be multiplication table.</p>
  
  <p>If rows are 3 and columns are 5 then, it should display rows, columns and inside the matrix it should give the multiplication of row and column. output should look like this.</p>
  
  <pre><code>     1    2    3    4    5
  1    1    2    3    4    5
  2    2    4    6    8    10
  3    3    6    9    12   15
  </code></pre>
  
  <p>This i want to create with simple loops. I am new to java so I am not able to figure out how can i do this. kindly let me know.  </p>
  
  <p>I have done the code till here.</p>
  
  <p>import java.util.*;</p>
  
  <pre><code>class cross_multiplication
  {
  
      public static void main(String a[])
          {
  
          System.out.println("How many rows required? : ");
          Scanner in1 = new Scanner(System.in);
          int num_rows = in1.nextInt();
  
          System.out.println("How many cols required? : ");
          Scanner in2 = new Scanner(System.in);
          int num_cols = in2.nextInt();
  
      //int arr1 [] = new int[num_rows]; 
      //int arr2 [] = new int[num_cols];      
  
          for(int i=0;i&lt;num_rows;i++)
          {
                  if (i==0)
                  {
                      System.out.print("");
                  }
                  else
                  {
                      System.out.print(i);            
                  }
                  System.out.print("\t");     
  
          }
  
  
      }
  }
  </code></pre>
  
  <p>Thanks</p>