#include<stdio.h>
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;
	printf ("n = ");
	scanf("%d", &n);
	printf ("Aedad matris %d dar %d ra be tartib har satr vared konid : \n", n, n);
	//nested loop avval
	for(i=0; i < n; i++)
		for(j=0; j < n; j++)
		{
			scanf("%lf", &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++;
	}
	printf("Natije = \nSum = %g\nZarb = %g\nBozorgtar = %g\nSefr = %d\nManfi = %d\n", Sum, Zarb, Bozorgtar, TedSefr, TedManfi);
	getch();
}

