> Print only the elements of that array that are on odd indices (values 20, 40, > …).
Ok, first thing you need it that exercise is to create an array and fill it
with values:
var a: array[10, int]
for i in 1 .. 10:
a[i-1] = 10*i
Run
Now comes the part you're struggling with:
for i in 0 .. 9:
if i mod 2 != 0:
echo a[i]
Run
There are of course (as shown above) other ways to do it, but this is how I (if
I were a beginner :)) would do it.
