clear; clc;

a = 54;
b = 32;

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