You can use modulus. If interval is 2, that means that every third line is written. Initialize a variable to 0 before the loop, then check before writing if that variable modulus (interval + 1) equals zero. Increment at the end of your loop.
pritaeas
Posting Prodigy
9,265 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,456
Skill Endorsements: 86
int count = 0;
increment the count by 1 during each loop then you mod count.
if count mod 5 = 0 then writeline.
Something like that.
Cameronsmith63
Junior Poster in Training
74 posts since May 2010
Reputation Points: 19
Solved Threads: 4
Skill Endorsements: 0