Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
257 B
0
Indexable
Never
#include <iostream>
using namespace std;

int main()
{
	float a, b,sa,f;
	a = 1;
	b = 0;
	f = 0;
	sa = 0;
	while (a != 0) {
		cin >> a;
		b += a;

		if (a == 0) {
			a = 0;
			cout << (b) / f;
			return 0;
		}
		a = 1;
		f++;
	}
	
}