title: Nested loops to find counting numbers
body: <p>never thought i had issues with nested loops well here Iam: What i want to achieve is this: Given two number  A and B i need to find all counting numbers between 1 and the A*B for example A=4 B=3 i need this:</p>
  
  <pre><code>      1 2 3
        4 5 6
        7 8 9
        10 11 12
  </code></pre>
  
  <p>I wrote the initial parts but i can't figure out how can i write down the value which changes in every row</p>
  
  <pre><code>      for(int i=1; i&lt;=A; i++){
                   for(int j=1; j&lt;=B; j++){
                        System.out.println("?");}}
  </code></pre>
  
  <p>Having A*B gives me</p>
  
  <pre><code>    1 2 3
      2 4 6
      3 6 9
      4 8 12
  </code></pre>
  
  <p>I tried some other combinations too but to no luck, It might look straight forward but its the first time i'm facing this. Thanks in advance!</p>