var
a:array [1..10] of integer;
i,min,k:integer;
begin
randomize;
for i:=1 to 10 do begin
a[i]:=random(46)-20;
write (a[i],' ');
end;
writeln;
min:=a[1];
k:=1;
for i:=2 to 10 do
if a[i]<min then begin
min:=a[i];
k:=i;
writeln ('Min: ',min);
writeln ('Index: ',k);
readln;
end.
var
a:array [1..10] of integer;
i,min,k:integer;
begin
randomize;
for i:=1 to 10 do begin
a[i]:=random(46)-20;
write (a[i],' ');
end;
writeln;
min:=a[1];
k:=1;
for i:=2 to 10 do
if a[i]<min then begin
min:=a[i];
k:=i;
end;
writeln ('Min: ',min);
writeln ('Index: ',k);
readln;
end.