How to turn for loop into a math equation?
<p>I have the following two loops in my program and I am trying to write them out as math equations, but I'm having some difficulty finding a concise way to do so:</p>

<pre><code>// Loop1
for (int i = 0; i &lt; nr; i++) {
    array[i] = nepr;
}

// Loop2
for (int i = 0; i &lt; (nvr % nr); i++) {
    array[i]++;
}
</code></pre>

<p>The code is completely function, but I'm trying to express these loops in a document I'm writing. </p>

<blockquote>
  <p>Any help would be very much appreciated.</p>
</blockquote>

<p>So far I have this:</p>

<pre><code>array[i] = nepr, i = 0,...,(nr-1)
</code></pre>

<p>but I'm not sure how to incorporate the second loop into the equation, or write a second equation for it.</p>