var
a:array [1..10] of integer;
i,x,y,k:integer;
s:real;
begin
randomize;
for i:=1 to 10 do begin
a[i]:=random(31)-10;
write (a[i],' ');
end;
writeln;
repeat
write ('Y = ');readln(y);
write ('X = ');readln(x);
until y<x;
for i:=1 to 10 do
if (a[i]>y) and (a[i]<x) then begin
s:=s+a[i];
k:=k+1;
if k=0 then writeln ('V massve net el y<a[i]<x ') else begin
s:=s/k;
writeln ('Sr. arifm: ',s:0:4);
readln;
end.
var
a:array [1..10] of integer;
i,x,y,k:integer;
s:real;
begin
randomize;
for i:=1 to 10 do begin
a[i]:=random(31)-10;
write (a[i],' ');
end;
writeln;
repeat
write ('Y = ');readln(y);
write ('X = ');readln(x);
until y<x;
for i:=1 to 10 do
if (a[i]>y) and (a[i]<x) then begin
s:=s+a[i];
k:=k+1;
end;
if k=0 then writeln ('V massve net el y<a[i]<x ') else begin
s:=s/k;
writeln ('Sr. arifm: ',s:0:4);
end;
readln;
end.