Is my algorithm bad here?

Oops. Yeah, I had the divide symbol instead of the modulus symbol.
Yeah, that’s clear to me now.
Thank you.