Assignment 1

7. Determine modulo division given the dividend and divisor as inputs without using modulo (%) operation

CPE102L
1Q1819
start

input dividend
input divisor

tempdivisor=divisor
tempdividend=dividend

while(tempdivisor<=tempdividend)
	tempdividend=tempdividend-tempdivisor
endwhile

print tempdividend

end