1var a:set of 0..40;
2 n,i,m:longint;
3begin
4 a:=[];
5 n:=0;
6 randomize;
7
8 repeat
9 m:=random(40);
10 if not(m in a) then
11 begin
12 a:=a+[m];
13 inc(n);
14 end;
15 until n=10;
16
17 n:=0;
18 for i:=0 to 40 do
19 if i in a then
20 begin
21 write(i:3);
22 inc(n);
23 if n mod 5=0 then writeln;
24 end;
25end.
2 n,i,m:longint;
3begin
4 a:=[];
5 n:=0;
6 randomize;
7
8 repeat
9 m:=random(40);
10 if not(m in a) then
11 begin
12 a:=a+[m];
13 inc(n);
14 end;
15 until n=10;
16
17 n:=0;
18 for i:=0 to 40 do
19 if i in a then
20 begin
21 write(i:3);
22 inc(n);
23 if n mod 5=0 then writeln;
24 end;
25end.