title: Trying to get 2 print statements on 1 line
body: <p>I'm trying to get the multiple of 5 <code>println</code> on the same line as the number, but it's not working a.t.m., it prints on the next line. The code uses a for loop which makes it more difficult for me anyone have any suggestions.</p>
  
  <pre><code>public static void main(String[] args)
  {
    for(int i=1 ; i&lt;101; i++)
    {
  
      System.out.println(" " +i);
  
      if (  i % 2 != 0 &amp;&amp; i % 5 == 0 )
  
         System.out.print("This is an odd number and a multiple of 5 \n " );
  
     }
  
    }//main
  </code></pre>