Program qwer; uses crt; var a : array [1..50] of integer; sum, kol, i, raz: integer; Begin sum := 0; kol := 0; write('Размер: '); readln(raz); for i := 1 to raz do begin readln(a[i]); if i mod 2 = 1 then begin kol := kol + 1; sum := sum + a[i]; end; end; write('Cреднее арифметическое: ',sum / kol); End.
uses crt;
var a : array [1..50] of integer;
sum, kol, i, raz: integer;
Begin
sum := 0; kol := 0;
write('Размер: '); readln(raz);
for i := 1 to raz do
begin
readln(a[i]);
if i mod 2 = 1 then
begin
kol := kol + 1; sum := sum + a[i];
end;
end;
write('Cреднее арифметическое: ',sum / kol);
End.