2 câu trả lời
program nguyên_tố;
uses crt;
var n,i,d:integer;
begin
clrscr;
write('Nhap so nguyen duong n: '); readln(n);
d:=0;
for i:=1 to n do
if n mod i=0 then d:=d+1;
if d=2 then write('La so nguyen to')
else write('Khong la so nguyen to');
readln;
end.
program nguyen_to;
uses crt;
var n,i,d:integer;
begin
clrscr;
write('Nhap so nguyen duong n: '); readln(n);
d:=0;
for i:=1 to n do
if n mod i=0 then d:=d+1;
if d=2 then write('La so nguyen to')
else write('Khong la so nguyen to');
readln;
end.