clear; clc;

a = 20;
b = 7;

r = a;
while r >= b
    r = r - b;
end
r
mod(a, b)