Simple,

the % operator will return the remainder that's gotten from the division of two numbers.

If i%1000 = 0, that means it's divisible by 1000, i.e. i = 0, i = 1000, i = 2000, etc.

for...