#include <iostream>
#include <string>
#include<fstream>

using namespace std;
void main()
{
	ifstream reader;
	reader.open("D:\\CPlusFiles\\Scores.txt");
	int x;
	int Scores[3][3];
	for (int i = 0; i < 3; i++)
	{
		for (int j = 0; j < 3; j++)
		{
			reader >> x;

			Scores[i][j] = x;
			cout << Scores[i][j] << " ";
		}
		cout << endl;
	}
	
	for (int i = 0; i < 3; i++)
	{
		int sum = 0;
		for (int j = 0; j < 3; j++)
		{
			sum += Scores[i][j];
		}
		double average = sum / 3.0;
		cout << average;
	}


	/*
	while (!reader.eof())
	{
		
		reader >> x;
		cout << x << endl;
	}
	*/
	reader.close();
}
