program SNT; uses crt; var n,i,j:integer; begin clrscr; write(‘Nhap n: ‘); readln(n); for i:=2 to n dobegin j:=2; while i mod j <>0 do j:=j+1; if j=i then write(j:4); end; write(n); readln end. Bình luận
program songuyento;uses crt;var n,i,j: integer;beginclrscr;write(‘ nhap so n:’);readln(n);for i:=4 to n dobegin j:=2; while i mod j <>0 do j:=j+1; if j=i then write(j:4); end; readlnend. Bình luận
program SNT;
uses crt;
var n,i,j:integer;
begin
clrscr;
write(‘Nhap n: ‘); readln(n);
for i:=2 to n do
begin
j:=2;
while i mod j <>0 do j:=j+1;
if j=i then write(j:4);
end;
write(n);
readln
end.
program songuyento;
uses crt;
var n,i,j: integer;
begin
clrscr;
write(‘ nhap so n:’);readln(n);
for i:=4 to n do
begin
j:=2;
while i mod j <>0 do j:=j+1;
if j=i then write(j:4);
end;
readln
end.