Share your repls and programming experiences

← Back to all posts
6.7. While: Average of sequence
pole55

Given a sequence of non-negative integers, where each number is written in a separate line. The sequence ends with 0. Print the average of the sequence.

Example input
10
30
0

Example output
20.0

Voters
Charanteja28
SwethaV
nharumi
TimothyDoan
CristopherHu
aximran7
Nourrisha
pole55