# include <iostream.h>
int main()
{
int array[7][3];
int i,j;
for (i=0;i<7;i++)
{
for (j=0;j<3;j++)
{
cin>>array[i][j];
}
cout<<endl;
}
for (i=0;i<7;i++)
{
for (j=0;j<3;j++)
{
cout<<array[i][j]<<" ";
}
cout<<endl;
}
return 0;
}
please help me to know how to get the sum of rows and the sum of rows in above matrix as a column and arow
int row [i];
for (int i = 0; i <7; i + +)
for (int j = 0; j <3 j + +)
r [i] + = a [i] [j]; // sum only one row
int b [7] [3];
for (int i = 0; i <7; i + +)
for (int j = 0; j <3; j + +)
b [i] [j] = a [i] [j] + a [i] [j];