int main(){
int n = 0;
int m = 0;
cout << "input n: ";
cin >> n;
cout << "input m:";
cin >> m;
int A[n][m];
for(int i = 0; i<n; i++)
for(int j = 0; j<n; j++)
cin >> A[i][j];
int sum = 0;
for(int i = 0; i<n; i++){
for(int j = 0; j<n; j++){
cout << A[i][j] << " ";
if(A[i][j] > 0) sum = sum + A[i][j];
}
cout << endl;
cout << "Sum: " << sum;
return 0;
int main(){
int n = 0;
int m = 0;
cout << "input n: ";
cin >> n;
cout << "input m:";
cin >> m;
int A[n][m];
for(int i = 0; i<n; i++)
for(int j = 0; j<n; j++)
cin >> A[i][j];
int sum = 0;
for(int i = 0; i<n; i++){
for(int j = 0; j<n; j++){
cout << A[i][j] << " ";
if(A[i][j] > 0) sum = sum + A[i][j];
}
cout << endl;
}
cout << "Sum: " << sum;
return 0;
}