Modulo (%) not calculating correctly

Thanks for the help, that explains the errors. I will fix it by creating a "for" loop to calculate out the divisor using integers.