 <p>The usual approach to this is to treat either the first or the last <code>printf</code> as a special case (outside of the loop):</p> <pre><code>for(ii=0; ii&lt;2; ii++) { jj = 0; printf("%d", jj); // first number printed without space. for(jj=1; jj&lt;4; jj++) { printf(" %d", jj); // include the space before the number printed } if(ii&lt;2-1) printf("\n"); } </code></pre> <p>Obviously I simplified how the loops are constructed and what is printed - for simplicity. You could make the first <code>printf</code> statement</p> <pre><code>printf("\n%d", jj); </code></pre> <p>then you have a newline at the start of your output (often a good thing) and then you don't need the <code>if</code> statement later - you just don't have a newline printed at the end of the line (because it will be printed at the start...)</p> <p>There are marginally more efficient ways of doing this that would involve no <code>if</code> statements at all - but these all come at the expense of less readable code. For example, here is a "no loop unrolling and no additional if statements" version of the code:</p> <p><a href="http://codepad.org/01qPPtee" rel="nofollow">http://codepad.org/01qPPtee</a></p> <pre><code>#include &lt;stdio.h&gt; int main(void) { int ii, jj; ii = 0; while(1) { jj = 0; while(1) { printf("%d", jj); // include the space before the number printed jj++; if(jj&lt;4) printf("."); else break; } ii++; if(ii&lt;2) printf("*\n"); else break; } return 0; } </code></pre> <p>Output:</p> <pre><code>0.1.2.3* 0.1.2.3 </code></pre> <p>Basically I have taken the functionality of the <code>for</code> loop and made it explicit; I also use a <code>.</code> rather than a <code></code> and <code>"*\n"</code> rather than <code>"\n"</code> to show in the printout that things behave as expected.</p> <p>It does what you asked without extra evaluation of the condition. Is it more readable? Not really...</p>