program minPomeniatiSPervam;
type Massiv=array[1..50]of integer;
var v: Massiv;
n,i, minim, indmin, temp: integer;
begin
write('n='); read(n);
writeln(' vvedi ',n,' cisel: ');
read(v[1]); minim:=v[1]; indmin:=1;
for i:=2 to n do
read(v[i]);
if v[i]<minim then begin minim:=v[i]; indmin:=i; end;
end;
temp:=v[1]; v[1]:=v[indmin]; v[indmin]:=temp;
writeln('new Massiv: ');
for i:=1 to n do
write(v[i],' ');
end.
program minPomeniatiSPervam;
type Massiv=array[1..50]of integer;
var v: Massiv;
n,i, minim, indmin, temp: integer;
begin
write('n='); read(n);
writeln(' vvedi ',n,' cisel: ');
read(v[1]); minim:=v[1]; indmin:=1;
for i:=2 to n do
begin
read(v[i]);
if v[i]<minim then begin minim:=v[i]; indmin:=i; end;
end;
temp:=v[1]; v[1]:=v[indmin]; v[indmin]:=temp;
writeln('new Massiv: ');
for i:=1 to n do
write(v[i],' ');
end.