program z3;
label 4,3;
var
M: array [1..15] of integer;
sum,i,a,n,max,min:integer;
ser: real;
begin
4: writeln('wvedit kilkist chisel [2..15]');
readln(n);
if n<2 then
goto 4;
if n>15 then
goto 4;
writeln('wvedit elementu massivy[-99..99] cherez ENTER');
for i:=1 to n do
readln (M[i]);
writeln ('zaday chisla');
for i:=1 to n do
writeln (m[i], ' ');
writeln;
sum:=0;
max:=M[1];
min:=M[1];
for i:=1 to n do
if max<M[i] then
max:=M[i];
if min>M[i] then
min:=m[i];
for i:=1 to n do
begin
sum:=M[i]+sum;
end;
ser:=sum/n;
writeln('max= ',max);
writeln('min= ',min);
writeln('sum= ',sum);
writeln('ser= ',ser:3:2);
writeln;
writeln('esli vuxod wvedit 5, esli povtor wvedit 1');
readln(a);
if a=5 then
goto 3;
if a=1 then
goto 4;
readln;
3:end.
