
Patrick B. answered 09/05/20
Math and computer tutor/teacher
You were given an algorithm to solve this problem.
You need to take the algorithm given and write the code yourself.
Once again, check MULTIPLES of the divisor until you get a product that is GREATER
than the dividend. Then subtract to find the remainder.
Here is another example.
EX. 1000 divided by 111
The DIVISOR is 111; the dividend is 1000
111*1 = 111
111*2 = 222
111*3 = 333
111*4 = 444
111*5 = 555
111*6 = 666
111*7 = 777
111*8 = 888
111*9 = 999
111*10 = 1110 <-- too big; backs up one
the quotient is 9, the partial product is 999 and the remainder is 1000-999=1
figure it out