program So_nguyen_to;
uses crt;
var i,dem,j:Integer;
begin clrscr;
writeln('Cac so nguyen to tu 2 den 100 la:');
for j:=2 to 100 do
begin
dem:=0;
for i:= 1 to j do if j mod i=0 then dem:=dem+1;
if dem=2 then write(j,' ');
end;
readln;
end.
Đúng 0
Bình luận (4)