snippet from a cis1500 course

Wrote it to solve the value for the modulos