Is this structure valid? : <p>I want to create a compact method tu calculate the summ of the first 20 even numbers and the multiplication of the first 20 odd numbers. is this correct?</p>

<pre><code>for(int i=0; i&lt;=20; i++) {
            (i % 2 == 0) ? (sumEven +=i;) : (productoImpares *= i;)
    }
</code></pre>
