1)
const n=?; //Сюда поставить любое нужное n
Var a:array[1..n] of real;
i,x,k:integer; s:real;
Begin
for i:=1 to n do
begin
readln(x);
a[i]:=x;
end;
s:=0;
k:=0;
for i:=1 to n do
begin
s:=s+a[i];
k:=k+1;
end;
s:=s/k;
for i:=1 to n do
if a[i] write(a[i],', ');
s:=s/k;
for i:=1 to n do
if a[i] write(a[i],', ');
readln;
End.
2)
Const n=?;
Var a:array[1..n] of integer;
i,max,min:integer;
Begin
for i:=1 to n do
begin
readln(x);
a[i]:=x;
end;
min:=a[1];
max:=a[1];
for i:=1 to n do
if (i mod 2)=0 then
if a[i]>max then
max:=a[i];
for i:=1 to n do
if (i mod 2)<>0 then
if a[i] min:=a[i];
writeln('max=',max);
writeln('min=',min);
readln;
End.