#include<iostream>
#include <iomanip>
#include<conio.h>
using namespace std;
int main()
{
	const int TedSatr = 3;
	const int TedSoton = 4;
	int x[TedSatr][TedSoton], Sum=0;
	int i, j;
	cout << "Aedad matris 3 dar 4 ra be tartib har satr vared konid : " << endl;
	//nested loop avval
	for(i=0; i < TedSatr; i++)
		for(j=0; j < TedSoton; j++)
		{
			cin >> x[i][j];
			Sum += x[i][j];
		}
	cout << endl << "Jame satr-ha va soton-ha = " << Sum << endl;
	cout << endl << "Matrix : " << endl;
	//nested loop dovvom
	for(i=0; i < TedSatr; i++)
	{
		for(j=0; j < TedSoton; j++)
			cout << fixed << setprecision(0) << setw(6) << setfill(' ') << x[i][j];
		cout << endl;
	}
	getch();
}

