uses crt; var a:array[1..100] of real; i,n,ind:integer; min,min2:real; begin clrscr; write('n='); read(n); writeln('massiv:'); for i:=1 to n do read(a[i]); min:=a[1]; min2:=a[1]; for i:=1 to n do begin if a[i]<min then begin min:=a[i]; ind:=i; end; end; for i:=1 to n do begin if (i<>ind) then if (a[i]<min2) then min2:=a[i]; end; write(min,' ',min2); end.
uses crt;
var a:array[1..100] of real;
i,n,ind:integer; min,min2:real;
begin
clrscr;
write('n='); read(n);
writeln('massiv:');
for i:=1 to n do
read(a[i]);
min:=a[1];
min2:=a[1];
for i:=1 to n do
begin
if a[i]<min then
begin
min:=a[i];
ind:=i;
end;
end;
for i:=1 to n do
begin
if (i<>ind) then if (a[i]<min2) then min2:=a[i];
end;
write(min,' ',min2);
end.