Const n=20; var a:array[1..n]of integer; i,k:integer; s:real; begin for i:=1 to n do begin a[i]:=random(201)-100; write(a[i]:4); if (a[i]>=10)and(a[i]<100)and(a[i]mod 2=0)then begin s:=s+a[i]; k:=k+1; end; end;writeln; if k<>0 then writeln(s/k:4:2) else writeln('нет четных двузначных'); end.
n=20;
var
a:array[1..n]of integer;
i,k:integer;
s:real;
begin
for i:=1 to n do
begin
a[i]:=random(201)-100;
write(a[i]:4);
if (a[i]>=10)and(a[i]<100)and(a[i]mod 2=0)then
begin
s:=s+a[i];
k:=k+1;
end;
end;writeln;
if k<>0 then
writeln(s/k:4:2)
else
writeln('нет четных двузначных');
end.
rez:real;
begin
for i:=10 to 99 do
if (i mod 2)=0 then
begin
k:=k+1;
rez:=rez+i;
end;
rez:=rez/k;
writeln(rez:0:1);
end.