#include <iostream>
#include <iomanip>
using namespace std;

int main() {
	int numYear;
	float rainfall;
	float total=0;
	float averagePerMth;
	int numOfMonths;
	
	cout << "Enter Number of Years.\n";
	cin >> numYear;
	
	while (numYear < 1)
	{
		cout << "Only enter number of year that is 1 or greater than 1.\n";
		cin >> numYear;
	}
	
	for (int i = 1; i<= numYear ; i++)
	{
		for (int e = 1; e <= 12 ; e++ )
		{
			cout << "Enter the rainfall for year : " << i << " and month " << e << endl;
			cin >> rainfall;
			while (rainfall < 0)
			{
				cout << "Only enter positive number for rainfall\n";
				cin >> rainfall;
			}
			
			total +=rainfall;
		}
	}
	
	numOfMonths = numYear * 12;
	averagePerMth = total / numOfMonths;
	
	cout << "Average rainfall\n";
	cout << "---------------------\n";
	cout << "Number of months : " << numOfMonths << endl;
	cout << fixed << setprecision (3);
	cout << "Total inches of rainfall : " << total << endl;
	cout << "Average Rainfall per month : " << averagePerMth << endl;
	return 0;
}