uses crt;
var n,i,d,j:integer;
a:array[1..20] of integer;
begin
clrscr;
write('Nhap so phan tu cua day:');
readln(n);
while (n>20) do
begin
write('nhap lai so phan tu cua day thoa man toi da la 20 phan tu:');readln(n);
end;
for i:=1 to n do
begin
write('a[',i,'] =');readln(a[i]);
end;
for i:=1 to n do
begin
d:=0;
for j:=1 to a[i] do
if a[i] mod j = 0 then d:=d+1;
if d=2 then writeln(a[i],' la so nguyen to');
end;
readln;
end.
Type mang=array [1..20] of integer;
var a:mang; i,n,k:integer;
begin
Writeln('nhap n');
readln(n);
for i:=1 to n do
begin
writeln(' nhap pt thu', i);
readln(a[i]);
end;
for i:=1 to n do
begin
k:=2;
while (k<= a[i]) and ( a[i] mod k <>) do
k:=k+1;
if k:= a[i] then writeln(a[i]);
end;
readln;
end,