Var a:array [0..10000] of integer;
b,c,n,i:integer;
begin
b:=0;
c:=0;
read (n);
For i:=n downto 1 do begin
read (a[i]);
If (a[i] mod 2 = 0) then
b:=b+1;
c:=c+a[i];
end;
Writeln ('Sum=',c,' Kol=',b,' SredA=',(c/b));
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Var a:array [0..10000] of integer;
b,c,n,i:integer;
begin
b:=0;
c:=0;
read (n);
For i:=n downto 1 do begin
read (a[i]);
If (a[i] mod 2 = 0) then
begin
b:=b+1;
c:=c+a[i];
end;
end;
Writeln ('Sum=',c,' Kol=',b,' SredA=',(c/b));
end.