#include <iostream>
using namespace std;
int A[100][100], sume[200];
int main()
{
int n, i, j;
cout << "n="; cin >> n;
cout << "introdu matricea (tabloul bidimensional: \n";
for (i=0; i<n; ++i)
for (j=0; j<n; ++j)
cin >> A[i][j];
for (i=0; i<n; ++i)
for (j=0; j<n; ++j)
sume[i+j]=sume[i+j]+A[i][j];
cout << "sumele paralelelor la diagonala principala: \n";
for (i=0; i<=2*(n-1); ++i)
cout << sume[i] << " ";
return 0;
}