Given n = 50 and d = 3, demonstrate the quotient remainder theorem

The quotient-remainder theorem states that for positive integers n and d

n div d = q, n mod d = r <--> n = dq + r and 0 ≤ r < d

From our long division calculator, q = 50 ÷ 3 = Floor(16.) = 16

From our modulus calculator, we see that r = 50 mod 3 = 2

n = dq + r

50 = (3)(16) + 2

50 = 48 + 2

50 = 50