Var a: array[1..10] of Integer; i,n,gg,ff,hh: Integer; begin for i:=1 to 10 do begin writeln('Введите ',i,' число'); readln(n); a[i]:=n; end; gg:=a[i]; for i:=1 to 10 do begin if a[i]<gg then begin gg:=a[i]; ff:=i; hh:=a[1]; end; end; a[1]:=gg; a[ff]:=hh; writeln(''); for i:=1 to 10 do begin writeln(a[i]); end; end.
i,n,gg,ff,hh: Integer;
begin
for i:=1 to 10 do
begin
writeln('Введите ',i,' число');
readln(n);
a[i]:=n;
end;
gg:=a[i];
for i:=1 to 10 do
begin
if a[i]<gg then
begin
gg:=a[i];
ff:=i;
hh:=a[1];
end;
end;
a[1]:=gg;
a[ff]:=hh;
writeln('');
for i:=1 to 10 do
begin
writeln(a[i]);
end;
end.