which is the cleaner way to do this simple while?
<p>I'm learning C++ and I want to make clean and readable code. I was wondering which way is better? (this is supposed to make the factorial of 9)</p>

<p>First Method: </p>

<pre><code>int main(){
    int i = 1,r = i;
    while (i &lt; 10) {
       r *= ++i;
    }
}
</code></pre>

<p>Second Method: </p>

<pre><code>int main(){
    int i = 1,r = i;
    while (i &lt; 10) {
       i++;
       r *= i
    }
}
</code></pre>

<p>The first may be harder to understand but it's one less line. Is it worth it? What about performance? Obviously it wouldn't matter in such a trivial example but it would be a good practice to make fast code from the beginning.</p>
