i = 0
s = 0
while True:
a = int(input())
if a == 0:
break
else:
s += a
i += 1
print(s/i)
x = int(input())
while x != 0:
print(x)
Объяснение:
i = 0
s = 0
while True:
a = int(input())
if a == 0:
break
else:
s += a
i += 1
print(s/i)
x = int(input())
while x != 0:
print(x)
x = int(input())
Объяснение: