clear; clc;

x = 101;
for y = 2 : x - 1
    if mod(x, y) == 0
        disp('Not a prime.');
        break;  % early termination
    end
end
if y == x - 1
    disp('Is a prime.');
end