title: nested for loop even number print out
body: <p>hello I am writing a code that will print even integers after the 10th number it will start on a new line so it will be 10 numbers per column and 10 rows. my code is printing all number but i want it to only print even numbers i tried to use an if statement but it does not seem to work please help. below is my code.</p>
  
  <pre><code>public static void mjj() {
      int s = 1;
      for (int i = 1; i &lt;=10;i++) {
          for (int j = 1; j &lt;=10;j++) {
              if (s % 2 == 0)
                  System.out.print(s++ + " ");
          }
          System.out.println();
      }
  }
  </code></pre>
  
  <p>output</p>
  
  <pre><code>1 2 3 4 5 6 7 8 9 10 
  11 12 13 14 15 16 17 18 19 20 
  21 22 23 24 25 26 27 28 29 30 
  31 32 33 34 35 36 37 38 39 40 
  41 42 43 44 45 46 47 48 49 50 
  51 52 53 54 55 56 57 58 59 60 
  61 62 63 64 65 66 67 68 69 70 
  71 72 73 74 75 76 77 78 79 80 
  81 82 83 84 85 86 87 88 89 90 
  91 92 93 94 95 96 97 98 99 100 
  </code></pre>
  
  <p>i want it to print this</p>
  
  <pre><code>2 4 6 8 10 12 14 16 18 20 
  22 24 26 28 30 32 34 36 38 40
  </code></pre>
  
  <p>and so on until the 10th row</p>