Euclid's Division Lemma:
According to Euclid's Division Lemma if we have two positive integers a and b, then there exists unique integers q and r which satisfies the condition a = bq + r where 0≤r≤b.
This algorithm is basically your division algorithm. In division we know that
"Dividend = Division*Quotient + Remainder"
Here a - Dividend, b - Divisor, q - Quotient and r - Remainder.