Владу

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
var
sim: array [1..30] of word;
i, count, t: byte;
c: word;
BEGIN
c:=0; count:=0;
repeat
c:=c+1; t:=0;
for i:=1 to c do
if (c mod i=0) then t:=t+1;
if (t=2) then
begin
count:=count+1;
sim[count]:=c;
end;
until (count=30);
for i:=1 to 30 do
write(' ', sim[i]);
writeln;
END.