Răspuns:
#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];
}
for(i = 0; i < n; i++)
{
s = 0;
for(j = 0; j < p; j++)
{
s = s+ m[i][j];
}
cout<<"s"<<i<<":"<<s<<endl;
}
return 0;
}