View Single Post
Old 03-19-2011, 08:35 PM   PM User | #2
Aradon
Moderator-san


 
Aradon's Avatar
 
Join Date: Jun 2005
Location: USA
Posts: 734
Thanks: 0
Thanked 20 Times in 19 Posts
Aradon is on a distinguished road
Sure this is possible, in a variety of ways.

Basically you'll need to use a boolean variable in order to turn on and off when you want to add by six and when you want to add by one.

So if you want to increment by six, just add five to your variable.

If you want to add by one, don't add anything.


Another alternative is to use the last parameter in the for loop to do the switching of the boolean variable.

In any case, hope that helps without actually doing the assignment for you!
__________________
"To iterate is human, to recurse divine." -L. Peter Deutsch
Aradon is offline   Reply With Quote