Fill the array with 20 random numbers so that the numbers do not repeat.

program arr;
const b = 40; // you can set another number that is greater than 19.
var a: array [1..20] of integer;
p, flag: integer;
begin
randomize;
for i: integer: = 1 to 20 do
begin
a [i]: = random (b) + 1;
if i> 1 then for j: integer: = 1 to i – 1 do
if a [i] = a [j] then
begin
flag: = 0;
while flag = 0 do
begin
flag: = 1;
a [i]: = random (b) + 1;
for k: integer: = 1 to i – 1 do if a [i] = a [k] then
begin
p: = 0;
flag: = flag * p
end
end
end
end;
for k: integer: = 1 to 20 do writeln (a [k]: 3)
end.



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.