Nick Cooperrider HW#3 Submission  

This works, but it would be more elegant to use modulus (%) in an appropriate way.