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:
// Loop1
for (int i = 0; i < nr; i++) {
array[i] = nepr;
}
// Loop2
for (int i = 0; i < (nvr % nr); i++) {
array[i]++;
}
The code is completely function, but I'm trying to express these loops in a document I'm writing.
Any help would be very much appreciated.
So far I have this:
array[i] = nepr, i = 0,...,(nr-1)
but I'm not sure how to incorporate the second loop into the equation, or write a second equation for it.