1)begin
var a := ArrRandom(5, -1, 1);
foreach var b in a do
Write(b:3)
end.
2)const N = 20;
var
a: array[1..N] of integer;
max: integer;
i, count: byte;
begin
randomize;
max := -26;
for i:=1 to N do begin
a[i] := random(40)-26;
write(a[i],' ');
if a[i] > max then max := a[i];
end;
writeln;
count := 0;
for i:=1 to N do
if abs(a[i]) > max then
count := count + 1;
writeln(count);
1)begin
var a := ArrRandom(5, -1, 1);
foreach var b in a do
Write(b:3)
end.
2)const N = 20;
var
a: array[1..N] of integer;
max: integer;
i, count: byte;
begin
randomize;
max := -26;
for i:=1 to N do begin
a[i] := random(40)-26;
write(a[i],' ');
if a[i] > max then max := a[i];
end;
writeln;
count := 0;
for i:=1 to N do
if abs(a[i]) > max then
count := count + 1;
writeln(count);
end.