Uses crt; const n=10; var a: array [1..n] of integer; x,min:integer; begin for x:=1 to n do begin write('a[',x,']:'); readln(a[x]); if a[x]>0 then min:=x; end; for x:=1 to n do if (a[x]>0) and (a[x]<a[min]) then min:=x; writeln; write('a[',min,']:',a[min]); end.
const n=10;
var a: array [1..n] of integer;
x,min:integer;
begin
for x:=1 to n do begin
write('a[',x,']:');
readln(a[x]);
if a[x]>0 then min:=x;
end;
for x:=1 to n do
if (a[x]>0) and (a[x]<a[min]) then min:=x;
writeln;
write('a[',min,']:',a[min]);
end.