title: How to write a While Loop for Simple Increments?
body: <p>I will need to write a WHILE loop for the following: "hello" is part of the output</p>
  
  <p>8 9 11 14 hello 18</p>
  
  <pre><code>    while(counter &lt; 18 )
      {
          System.out.print(" " + counter);
  
          counter = counter + 1 ;
  
          if(counter &gt; 14 &amp;&amp; counter &lt; 18){
              System.out.print(" hello ");
          }
  
      }
  </code></pre>
  
  <p>The above is my sample code. I am unable to figure out how to increase it by 1, 2 then 3. Can anyone help , please?</p>