const N = 15;
var
arr: array[1..N] of integer;
i: byte;
index: byte;
begin
randomize;
for i:=1 to N do begin
arr[i] := random(100) - 50;
write(arr[i],' ');
end;
writeln;
index := 0;
if (arr[i] < 0) and (index = 0) then
index := i
else
if (arr[i] < 0) and (arr[i] > arr[index]) then
index := i;
if index <> 0 then
writeln(index,': ',arr[index]);
end.
const N = 15;
var
arr: array[1..N] of integer;
i: byte;
index: byte;
begin
randomize;
for i:=1 to N do begin
arr[i] := random(100) - 50;
write(arr[i],' ');
end;
writeln;
index := 0;
for i:=1 to N do begin
if (arr[i] < 0) and (index = 0) then
index := i
else
if (arr[i] < 0) and (arr[i] > arr[index]) then
index := i;
end;
if index <> 0 then
writeln(index,': ',arr[index]);
end.