PascalABC.NET
begin
var s, n, p: integer;
s := 0;
n := 0;
repeat
Read(p);
if p = 0 then
break;
s += p;
n += 1
until False;
Write('Сумма = ', s, ', ср.арифм = ', s/n)
end.
PascalABC.NET
begin
var s, n, p: integer;
s := 0;
n := 0;
repeat
Read(p);
if p = 0 then
break;
s += p;
n += 1
until False;
Write('Сумма = ', s, ', ср.арифм = ', s/n)
end.