Răspuns:
n=2
p=2
m[0][0]=1
m[0][1]=2
m[1][0]=3
m[1][1]=4
s:10
Explicație:
#include <iostream>
using namespace std;
int main() {
int m[10][10], i, j, n, p, s;
cout <<"n=";
cin >> n;
cout <<"p=";
cin >> p;
for(i = 0; i < n; i++)
for(j = 0; j < p; j++)
{
cout<<"m["<<i<<"]["<<j<<"]=";
cin>>m[i][j];
}
s = 0;
for(i = 0; i < n; i++)
for(j = 0; j < p; j++)
s = s+ m[i][j];
cout<<"s:"<<s<<endl;
return 0;
}