Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
172 B
1
Indexable
Never
#include <iostream>

using namespace std;

int main ()
{
    int a=-1, b, c = 0;
    do
	{
	    cin >> b;
	    c+=b;
	    a++;
	} while (b != 0);
    cout << float(c)/a;
}