kiem tra nguyen to theo e chach nay le the best:

for i:=2 to trunc(sqrt(N)) do if N mod i=0 then
begin
kt:=false;
exit;
end;

[=========> Bổ sung bài viết <=========]