title: Do-While Loop Counting 1 to 30 on separate lines in Java
body: <p>I am currently in a java class learning about all types of loops, and am stuck on a question specifically on do-while loops. The question asks that we create a do-while loop that counts 1 to 30, with the counting jumping to the next line after 10 integers, for example: </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
  </code></pre>
  
  <p>I have my loop started, and I can have it print values one through thirty, but I am not sure how to make it skip a line every 10 integers. Here is my current code: </p>
  
  <pre><code>int q = 0;
  do
  {       
      q=q+1;
      System.out.print(q+" ");
  }
  while (q&lt;30);
  System.out.println();
  </code></pre>