Hi I am just starting to learn coding, and how can I make this code more elegant? I don\'t want to write the same for loop twice.
for (int i = 0; i < n