#include<iostream>
using namespace std;
int main() {
	cout << "Mean of n Numbers \n";
	cout << "To exit, n < 1 \n\n";
	while (true) {
		int n;
		cout << "n = ";
		cin >> n;
		if (n<1) {
			cout << "The program is terminated. Bye!";
			break;
		}
		double s = 0;
		for (int i=0; i<n; i++) {
			double x;
			cout << "Number" << i+1 << " = ";
			cin >> x;
			s += x;
		}
		double m = s / n;
		cout << "Mean = " << m << endl;
		cout << endl;
	}
	return 0;	
}
