##
var (n, s, k) := (ReadInteger, 0, 0);
for var i := 1 to n do
begin
var t := ReadInteger;
if t > 0 then
s += t;
Inc(k)
end;
if k > 0 then
Print(s / k)
else
Print('Нет положительных чисел')
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
##
var (n, s, k) := (ReadInteger, 0, 0);
for var i := 1 to n do
begin
var t := ReadInteger;
if t > 0 then
begin
s += t;
Inc(k)
end;
end;
if k > 0 then
Print(s / k)
else
Print('Нет положительных чисел')