#include<iostream.h>
int t[30][30], i, j, n, q=0,p=1;
void main()
{
cout<<"n="; cin>>n;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
{
cout<<"t["<<i<<"]["<<j<<"]=";
cin>>t[i][j];
}
cout<<endl;
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
cout<<t[i][j]<<" ";
cout<<endl;
}
cout<<endl;
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
if(i<j)
p=p*t[i][j];
else if(i>j && t[i][j]<0)
q++;
cout<<"Produsul de deasupra diagonalei principale este "<<p;
cout<<" si sub diagonala principala sunt "<<q<<" elemente negative";
}