0
0
0
0
0
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++)
{
cin>>a[i][j];
if(j==i)
{
sum+=a[i][j];
cout<<a[i][j]<<" ";
}
}
}
0
