You do not specify a language so this is in C++
for (int i = 0; i < 100; ++i)
{
// Do stuff
if (i % 12 == 0)
{
// In addition to the regular actions in this
// loop, do stuff every 12th iteration of the loop,
// starting with the first
}
}
Here I am assuming that when you use the term modulus you are referring to arithmetic modulo N.
If this is not what you actually mean in your question, perhaps you can edit it to provide code for the examples and tutorials that you are referring to.