program Rand1;
var
A: array [1..5] of Integer;
i: Integer;
begin
Randomize;
for i := Low (A) to High (A) do begin
A [i] := Random (3) - 1;
WriteLn (A [i] :3)
end;
ReadLn;
end.
program Rand2;
A: array [1..7] of Double;
A [i] := Random (100001) / 100000 + 3;
WriteLn (A [i] :8 :2)
program Rand3;
A: array [1..10] of Integer;
for i := 1 to 10 do begin
A [i] := Random (21) + 20;
WriteLn (A [i], ' ');
program Read4;
A: array [1..7] of Integer;
Write ('Введите ', i, ' число: ');
ReadLn (A [i]);
for i := High (A) downto Low (A) do
Write (A [i], ' ');
program Rand1;
var
A: array [1..5] of Integer;
i: Integer;
begin
Randomize;
for i := Low (A) to High (A) do begin
A [i] := Random (3) - 1;
WriteLn (A [i] :3)
end;
ReadLn;
end.
program Rand2;
var
A: array [1..7] of Double;
i: Integer;
begin
Randomize;
for i := Low (A) to High (A) do begin
A [i] := Random (100001) / 100000 + 3;
WriteLn (A [i] :8 :2)
end;
ReadLn;
end.
program Rand3;
var
A: array [1..10] of Integer;
i: Integer;
begin
Randomize;
for i := 1 to 10 do begin
A [i] := Random (21) + 20;
WriteLn (A [i], ' ');
end;
ReadLn;
end.
program Read4;
var
A: array [1..7] of Integer;
i: Integer;
begin
for i := Low (A) to High (A) do begin
Write ('Введите ', i, ' число: ');
ReadLn (A [i]);
end;
for i := High (A) downto Low (A) do
Write (A [i], ' ');
ReadLn;
end.