#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
	const int TedSatr = 10;
	const int TedSoton = 10;
	double x[TedSatr][TedSoton], Sum=0, Zarb=1, Bozorgtar;
	int n, i, j, TedSefr=0, TedManfi=0;
	cout << "n = ";
	cin >> n;
	cout << "Aedad matris " << n << " dar " << n << " ra be tartib har satr vared konid : " << endl;
	//nested loop avval
	for(i=0; i < n; i++)
		for(j=0; j < n; j++)
		{
			cin >> x[i][j];
			if(x[i][j]<0)
				TedManfi++;
		}
	Bozorgtar = x[0][0];
	//loop dovvom
	for(i=0; i < n; i++)
	{
		Sum += x[i][0];
		Zarb *= x[n-1][i];
		if(x[i][i] > Bozorgtar)
			Bozorgtar = x[i][i];
		if(x[i][n-1-i] == 0)
			TedSefr++;
	}
	cout << "Natije = " << endl << "Sum = " << Sum << endl << "Zarb = " << Zarb << endl << "Bozorgtar = " << Bozorgtar << endl << "Sefr = " << TedSefr << endl<< "Manfi = " << TedManfi << endl;
	getch();
}

